My problem relates specifically to trying to install the SQL Server 2000 Client Tools in silent (unattend) mode.

Here's what I've done:
1. Following the MS documentation I've created the .iss file for inclusion with the installation
2. I've created a batch file which launches the unattend setup using the following command:

start /wait "[UNC path]\setupsql.exe" k=SMS -s -m -SMS -f1 "[UNC path]\sqlcli.iss"

3. I've created a software package on SMS and which runs this batch file then advertised it to the client. (Configured to run when user is logged in)

SMS logs that the package is received and begins installing however proceeds no further. I get no success or failure result.
If I manually run the batch file from the client, the install works fine.

I've experimented by creating a simple batch file which calls notepad.exe and I get the same result. So I'm assuming there's an error in the way I'm launching apps within a batch file distributed with SMS.

Help would be appreciated.


0 Comments   [ + ] Show 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.


I use SMS 2.0 and had the same issue the first time I tried to launch using a batch file. The solution for me at the time was to grab a freeware tool that compiled the batch file into a COM file and I think I remember that working fine. Since then, I've done most anything that I would have done in at Batch file in the SMS Installer and compiled it into an EXE. It's probably something simple, but I worked for a few days wondering why my app didn't launch on the remote computer.
Answered 05/18/2004 by: usachrisk
Purple Belt

Please log in to comment
Hmmm. Using Wise Script I've compiled an .exe with the same run command, however I get the same result, although this time SMS reports the advertisment as being successful, however the SQL setup doesn't start. I've confirmed this by removing the -s (install silent switch). When I run the exe manually on the client the install works fine.

There must be a setting I haven't got right on the package in SMS.
Answered 05/18/2004 by: lewishan
Yellow Belt

Please log in to comment
Are u running the package with Admin priv in SMS?
Also try install with the CLient SW Installation account.
Answered 10/12/2004 by: oofemioo
Blue Belt

Please log in to comment
The batch files must be run with disk drive letter (any) not with UNC path. Hope it helps.
Answered 10/20/2004 by: kuji2000
Senior Yellow Belt

Please log in to comment
I have run into similar issues with trying to run batch files that call executables through SMS and would love to know of any other workarounds. I am currently working for a client who does not want to use the SMS Software Updates piece so were are stringing KB hotfix installs into one .BAT file. This actually does work, but whenever there is a problem with one of the hotfixes for a particular user, because the install is part of a batch file, the batch file just continues running and as long as the last line of the batch file is successful, SMS reports the whole install(s) as successful.

Here is an example of our script:

rem **Security Update KB896358 06-2005**
KB896358.exe /quiet /norestart
set exit=%errorlevel%
set failloc=2-KB896358
If NOT %exit% == 0 goto Fail
echo %failloc% installed successfully. >>C:\WINDOWS\system32\CCM\logs\Sec_Updates.log

So we are keeping a log file on the user's hard drive to track the success and failures (which works). The installs themselves do work a large majority of the time.

But at the end of our BAT file we have...

echo %failloc% failed with error code %exit%. >>C:\WINDOWS\system32\CCM\logs\Sec_Updates.log
Rem Run qchain in case some updates have run
exit /b %exit%

It's our understanding that the exit /b switch will force quit a BAT file and make it appear to SMS that the batch file has failed (which we want). We are also trying to pass SMS the errorlevel (our %exit% variable). But, we think, because the exit command actually succeeds, SMS thinks the whole batch file succeeded and returns a "Successful" install to the user.

How can we use BAT files to install multiple programs and error trap or pass errors to SMS? Others have told us Exit /B was the correct way to do this but it hasn't worked for us yet. Any help would be appreciated. Obviously we could create separate programs for each KB fix (or future combinations) but would like to avoid it if necessary.


Answered 07/25/2005 by: bbowen8
Senior Yellow Belt

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