By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,640 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,640 IT Pros & Developers. It's quick & easy.

Windows Default Directories

P: n/a
If I was pointing my app to a particular directory, I would just use:
"C:\Whatever\"

But - If I want my app to use one of the Windows default directories
(Desktop, MyDocuments), since they can be different, depending on which
operating system, so how can I define this in code (like - Desktop)?
Nov 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Elmo Watson" <sp*****@yahoo.comschrieb:
But - If I want my app to use one of the Windows default directories
(Desktop, MyDocuments), since they can be different, depending on which
operating system, so how can I define this in code (like - Desktop)?
Check out 'System.Environment.GetFolderPath'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 6 '06 #2

P: n/a
Using event variables (i.e. %Systemroot% for C:\Windows or \Winnt in
2000) would work well also.

Elmo Watson wrote:
If I was pointing my app to a particular directory, I would just use:
"C:\Whatever\"

But - If I want my app to use one of the Windows default directories
(Desktop, MyDocuments), since they can be different, depending on which
operating system, so how can I define this in code (like - Desktop)?
Nov 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.