Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Appukuttan
(94)
Abhi
(72)
Babu Akkandi
(63)
Last 7 Days
Appukuttan
(619)
Babu Akkandi
(470)
divya
(321)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
How to find the windows folder and other special folders.
Posted Date: 30 Apr 2006
Resource Type:
Articles
Category:
.NET Framework
Author:
Tony John
Member Level:
Gold
Rating:
Points
: 10
Many developers assume windows path will be C:\\Winnt and hardcode this path in code.
It need not be true in all cases. Also, the windows path varies by operating system. So, it is a good idea to programmatically find the windows path instead of assuming it.
Here is the code to find the windows root path:
Environment.GetEnvironmentVariable("SystemRoot")
Alternatively, you can access another environment variable to find the windows directory.
Environment.GetEnvironmentVariable("windir")
The above calls will return the correct windows path for any windows operating system.
You can use the above approach to find various other special folders including users default folder, program file folder etc.
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Creating a Singleton Object
Previous Resource:
ViewState - behind the scenes
Return to Discussion Resource Index
Post New Resource
Category:
.NET Framework
Post resources and
earn money
!
Related Resources
13 Years of Microsoft Certifications---Part1
The Padding Ball game in WPF
How to convert a simple DLINQ Query to a data set object
Passing Parameters
Enumeration in .NET
dotNet Slackers
BizTalk Adaptors
Web Design
Contact Us
Privacy Policy
Terms Of Use