WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Determine Current CD Winbatch is Running On

Keywords: 	 Determine Current CD Winbatch is Running On 


Question:

I am trying to run an application from a cdrom. The issue is that some users may have more than one installed and it may or may not be set to a certain drive letter. How would I detect what drive I am running the application from and how would I set it as the root directory?

Answer:

Assuming you are running a compiled EXE I use:
mypath=DirHome()
mydrive=Strsub(mypath,1,2)
or for a more general version that works with uncompiled wbt's
moi=IntControl(1004,0,0,0,0)
mypath=FilePath()
mydrive=Strsub(mypath,1,2)

Article ID:   W15509
File Created: 2003:05:13:11:28:26
Last Updated: 2003:05:13:11:28:26