Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Unable to execute the batch file created by Wise

Updated: 21 May 2010 | 4 comments
Onkar's picture
0 0 Votes
Login to vote

Hi ,

I am creating a batch file using the Wise Installation System for silent installation of SQL Server Express 2005 Instance.
Although my batch file is created successfully it doesn't get executed via Wise Script.
When I try to execute the same batch file directly it is doing the desired behaviour.
Can some one please give me point where i could be going wrong.

Contents of batch file are following:
cls
CD C:
CD C:\Program Files\\SQL Express
start /wait Setup.exe /qn INSTANCENAME=HELLO ADDLOCAL=SQL_Engine SAPWD="Antarctica" SECURITYMODE=SQL DisableNetworkProtocols = 0 REBOOT=ReallySuppress /L*v "C:\Program Files\\SQL Express\SQL_Install_Log.txt"
echo %ERRORLEVEL% > C:\Program Files\SQL Express\TEMP.TXT

I am using Wise Installation System 9.0 on Windows XP SP3.

One more issue which I am facing while executing another batch file is windows error unable to open file "C:\Program Files\SQL Express\Execute.bat"  What could be reason for this?

Thanks in advance.

Thanks,
Onkar

Comments

spoonhead7's picture
26
Sep
2009
0 Votes 0
Login to vote

Wise doesnt make batch files

Sounds like you're trying to execute a batch file using WiseScript

There is an article in the Altiris Knowledgebase on how to do this.  Go to https://kb.altiris.com
and in the search field enter '2800' or 'Executing a DOS Program in WiseScript'

That should help.

slb's picture
28
Sep
2009
0 Votes 0
Login to vote

Try this out..

I believe you had tried to run the batch script from a share/server location to find the windows error that you have mentioned.

Recode your batch script as below to check out the functionality:

cls C: CD C:\Program Files\\SQL Express
start /wait Setup.exe /qn INSTANCENAME=HELLO ADDLOCAL=SQL_Engine SAPWD="Antarctica" SECURITYMODE=SQL DisableNetworkProtocols = 0 REBOOT=ReallySuppress /L*v "C:\Program Files\\SQL Express\SQL_Install_Log.txt"
echo %ERRORLEVEL% > C:\Program Files\SQL Express\TEMP.TXT



The above should not pop up any error for your batch script run. This could have been a potential problem when you had tried to execute it through wrapper too.

Hope this helps!!

EdT's picture
28
Sep
2009
0 Votes 0
Login to vote

Issues

I assume you are creating the batch file using the "Insert Line into Text File" command.

Once you have written the batch file, you need to call it using %SYS32%\CMD.EXE /C  <full path to batch file> - you cannot execute the batch file directly, and this may be the cause of your error.

Also, check the syntax of the batch file you have quoted above. At one point you have a double backslash \\ in the middle of a path, and your
echo %Errorlevel% command has a path where you have forgotten double quotes and there is a space in the path, so another potential point of failure. You must always put double quotes around paths with spaces in them, or around paths where a variable is used which may resolve to a path with a space in it.
Simple errors like this will cause you lots of needless hassle.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

slb's picture
28
Sep
2009
0 Votes 0
Login to vote

Suspected first that \\ would

Suspected first that \\ would kill the script, but fortunately or unfortunately it works with an example i tried out.