Is this the correct way of getting Desktop

For questions about using Classic.

Post » Tue Oct 25, 2011 5:37 pm

I want to get the deskop path but the name is diffrnt depending on the language of windows. So i had to look up that name. Is this the correct way that works on all computers? Is there a better way?


-> Registry: Open key "Volatile Environment" under root HKEY_CURRENT_USER
-> Text: Set text to Registry.ReadString("USERPROFILE")+"\"
-> Registry: Open key "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" under root HKEY_LOCAL_MAHCINE
-> Text: Set text to Text.Text+Registry.ReadString("Name")
B
18
S
4
G
1
Posts: 413
Reputation: 2,512

Post » Tue Oct 25, 2011 7:01 pm

I wouldn't do so.

Just as in this thread, a day ago, just use the path object. It returns all system paths, like desktop, cookies, fonts, my documents, app data, etc.
It works independent of the system's language.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Wed Oct 26, 2011 5:59 pm

Great! I had overlooked that!
B
18
S
4
G
1
Posts: 413
Reputation: 2,512


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests