Solved

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

Posted on 1999-01-06
3
141 Views
Last Modified: 2010-05-03
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?
0
Comment
Question by:caraf_g
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Mirkwood earned 50 total points
ID: 1454210
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
 
LVL 10

Author Comment

by:caraf_g
ID: 1454211
Thanks!
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1454212
No hard feelings, but just out of curiosity. Why not an A?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb6 programatically bring window to front 8 74
vb6 connector to SQL Server 2 37
passing a value with stream reader AFTER a ";" 3 74
Set email body to html using vbscript 6 49
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question