Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
krishnavenikal...
(12)
Nikhil Gaur
(10)
Randhir Yadav
(1)
Last 7 Days
Anil Kumar ...
(582)
Nikhil Gaur
(561)
Abhisek Panda
(445)
more...
Resources
»
Articles
»
.NET Framework
»
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:
Diamond
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
to add tags.
(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
Creating a Singleton Object
Object Oriented Programming In c#
Working with Flat-Files
Naming Convetions for .NET application
Isolated applications and side-by-side assemblies
IP Addresses
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use