Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get users desktop location?
Message
 
To
21/06/2021 18:27:58
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01681485
Message ID:
01681509
Views:
42
>
Getenv("userprofile")+"\desktop\
>
>>>The above will not work.
>
>How come? I thought this would be the User Profile environment variable used by Windows itself. I suppose it's possible desktop goes somewhere else in some Citrix configs, is that the objection?
>
>>>You need to use something like this:
>
objSFolders = CreateObject("WScript.Shell")
>
>Should also be fine unless PC is locked down...
>
>To Victor/whoever: if you fire up Command Prompt (cmd) and type SET, it displays the available environment variables and current content, which may give you some pointers.

John, I ran your code and it gave me a folder on the C drive. My desktop and all data is on my D drive.

I seriously doubt that that object WScript.Shell is not available.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform