Hi All,

I am trying to execute a batch file in my wise script.

I am copying the files from the network install location to a local dir in C:\
Ex: Set variable TestDIR to C:\Test
I then want to run the batch file say abc.bat
In my script I have tried using Execute Program command

.EXE Path: C:\WINDOWS\System32\cmd.exe
Command Line: "%TestDIR%\abc.bat" -silent
Default Directory: %TestDIR%
Checked the box - Wait for program to Exit

When I compile and execute this script:
I only see a command window on the screen with the cursor blinking on C:\TestDIR>

The batch file does not execute.

If I go to the command prompt on the same machine and open a command prompt.
Go to the TestDir and type abc.bat - silent (it executes).

Please Help me on how to excute the batch file through wise script.

Thanks in advance.
0 Comments   [ - ] Hide 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.
Answer this question or Comment on this question for clarity


methinks you want to do cmd.exe /w (close cmd window) and remove the -silent after the bat file
Answered 11/30/2010 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
Thanks for the reply,

The /w switch is not working for me. Also the batch file has to install silently (Batch file installs the IBM RAD iFix, It has to install silently).

Answered 11/30/2010 by: reethu005
Orange Belt

Please log in to comment
Use /C command

C:\WINDOWS\System32\cmd.exe /c "%TestDIR%\abc.bat"
Answered 11/30/2010 by: murali.bhat
Purple Belt

Please log in to comment