Solved

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

Posted on 1999-01-06
3
143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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
Microsoft Access combo box help 2 57
Visual Studio search word table and return Cell index 8 85
Macro Excel - Multiple If conditions 2 94
2 Global Vars, 1 List Box 4 31
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

734 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