Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using App.Path Method to Find Root Directory

Status
Not open for further replies.

OC2

IS-IT--Management
Apr 2, 2001
59
0
0
SG
Hi,

Just wondering if i can use app.path to determine the drive letter for example

I have 2 CDroms labeled D: and E:

On the root directory of my cd i have i have numerous folders one of which I want to call my Auto Run from.

The application is then run, but when i select the application I want to run, it needs to shell a program located on another folder accessable only from the root directory.

So

How would I go from for example

E:\application 1 (Auto Run ) then shell a program on
E:\application 2

As the E:\ could be D:\ aswell I cannot hardcode this location

Any help would be apprieciated thx

 
If you application is running from the CD-ROM drive you could use this:

Code:
Dim AppDrive As String

AppDrive = Left(App.Path, 3)
 
Thx alot

Exactly the answer I was looking for
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top