Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / finding the desktop...

Author
Message
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 15th Jul 2008 12:16
Ok, I know that in almost every different version of windows, the desktop is located in a new folder. For instance:

Windows 98: c:\windows\desktop
Windows XP: c:\documents and settings\admin\desktop
Windows Vista: c:\users\admin\desktop

so, is there a registry setting that is common in all versions of windows that will give the location of the current desktop? The use is with the cd or set dir commands. I need a button to change the current directory to the desktop.

Thanks in advance, let me know if you need any more info.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 16th Jul 2008 10:12 Edited at: 16th Jul 2008 10:17
Ok. Try this out. It uses the win32 api to get info from the registry. It gets the Desktop path on mine accurately. Let me know if it works for you. I included a series of possible folder retrievals in the function itself if you set value$= to any of those names:



Enjoy your day.
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 16th Jul 2008 11:17
Yeah, it works! Thanks latch!

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
17
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 17th Jul 2008 01:32
I'm going to make an assumption on this post... Good luck with the DBC challenge mate.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 17th Jul 2008 03:50
Good assumption, thanks Irojo!

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
17
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 17th Jul 2008 04:45
I was right for once!

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?

Login to post a reply

Server time is: 2025-06-07 06:44:40
Your offset time is: 2025-06-07 06:44:40