?
Solved

Getting Windows path (for example: "c:\windows")

Posted on 2002-07-05
5
Medium Priority
?
141 Views
Last Modified: 2010-05-02
How can I get it ("d:\winnt", for exmaple)?
0
Comment
Question by:slavikn
  • 2
  • 2
5 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 80 total points
ID: 7131654
Many different ways in fact:

Debug.Print environ("Systemroot")

Is the easiest but you can also use the .SpecialFolders property of the wshShell object (if you have IE installed with the scripting runtime) or access it from the registry using registry classes.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7131655
Try this:
Environ("WINDIR")

CHeers
0
 
LVL 1

Author Comment

by:slavikn
ID: 7131665
Same answers, but TimCottee was first.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7131678
Same minute :-)
Glad we could help!!
0
 
LVL 1

Author Comment

by:slavikn
ID: 7131714
Hello angelIII,

Please post any comment here:
http://www.experts-exchange.com/visualbasic/Q_20319886.html
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 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