Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2002-07-05
5
Medium Priority
?
139 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 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

Technology Partners: 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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

609 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