How can one find out the path to one's Desktop?

If you're logged on as Mr._X the path to your desktop might be:

C:\WINNT\Profiles\Mr._X\Desktop

But the exact path depends on what version of Windows you have installed, what drive and what directory you decided to install Windows in etcetera.

Is there a way in VB to retrieve this information?
LVL 10
caraf_gAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MirkwoodConnect With a Mentor Commented:
Sure, using the registry.

This is the location. I assume you have function to access the registry otherwise I can provide them for you.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
Key: Desktop
0
 
caraf_gAuthor Commented:
Thanks!
0
 
MirkwoodCommented:
No hard feelings, but just out of curiosity. Why not an A?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.