Solved

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

Posted on 2002-07-05
5
133 Views
Last Modified: 2010-05-02
How can I get it ("d:\winnt", for exmaple)?
0
Comment
Question by:slavikn
[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
  • 2
5 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 20 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 93
Macro Excel - Multiple If conditions 2 93
Problem to With line 4 86
Remove Exif Orientation before adding image to db 9 62
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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