Hi

I need a batch file command to run the exe from other folder (sub folder).

Please help me
Thanks.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
start /wait somepathtofile\somefile.exe /some switches
Answered 03/02/2011 by: dyehardfan
Second Degree Blue Belt

Please log in to comment
0
if it's a subfolder this little line of code might be of use to you:

pushd %~dp0
-- Do Stuff --
popd

this will basically do a cd to the current directory, you can work with relative dirs from there.

Rgds,

PJ
Answered 03/03/2011 by: pjgeutjens
Red Belt

Please log in to comment
0
Hi PJ,

The scenario is,
There are 2 folders Folder A and Folder B.
Folder A has a batch file and setup.exe. Folder B has a MSI.
The batch file runs the setup.exe. After installing the setup.exe, I need to install the MSI which is in Folder B.
These 2 folders are in a network shared drive which will change later.

My question is how to specify the network path with pushd command.

Thanks.
Answered 03/03/2011 by: reethu005
Orange Belt

Please log in to comment
0
as long as the folder structure on the drive share is predictable you can play around with pushd and popd.

For your specific example, let's assume you're running the script from folder A
pushd %~dp0 //get the Folder A path and go to it
pushd .. //Go to the parent folder
set parent=%cd%
popd //go back to the current folder
-- do what you need to do here--
pushd "%parent%\Folder B" // go to folder B
-- do what you need in folder B --
popd

Guess I'm telling you to just play around with it abit [:D]

PJ
Answered 03/03/2011 by: pjgeutjens
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity