Batch file help... determine drive it is run from
This problem is very trivial, but I have been searching all over the place and haven't found an answer. I have a batch file that works on its own. My installer has to call use batch code rather than calling the external batch file, which looks like: START directory\directory\directory\program.
This problem is very trivial, but I have been searching all over the place and haven't found an answer.
I have a batch file that works on its own. My installer has to call use batch code rather than calling the external batch file, which looks like:
START directory\directory\directory\program.exe -param -param param_directory\param_jarfile.jar
This code works fine from the batch.bat file, but from the installer I get an error that the executable cannot be found.
How can I determine the drive the batch file was run from? Given the drive letter I should be able to build the string necessary for the START command to open the file.
I have a batch file that works on its own. My installer has to call use batch code rather than calling the external batch file, which looks like:
START directory\directory\directory\program.exe -param -param param_directory\param_jarfile.jar
This code works fine from the batch.bat file, but from the installer I get an error that the executable cannot be found.
How can I determine the drive the batch file was run from? Given the drive letter I should be able to build the string necessary for the START command to open the file.
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.