PDA

View Full Version : Windows XP versus 2003 custom action


feiock
07-23-2008, 01:04 PM
I have a setup project that uses a custom action to call a batch script. I am using the "Run Executable" custom action with the "Internal binary" option selected, and the path set to:
"C:\WINDOWS\system32\cmd.exe".

The arguments are:
C:\WINDOWS\system32\cmd.exe /C C:\TempReportingServices\SSRSSetupReports.cmd [REPORTSERVER]

The issue is this. When I build my setup project on a Windows 2003 machine (our build server), I can run the resulting .msi fine on that 2003 server or any other 2003 server. However if I try to run that same .msi on a WinXP machine, it fails with this error:

MSI (s) (08:14) [13:20:49:547]: Note: 1: 1722 2: RunSSRSCmdScript 3: C:\WINDOWS\Installer\MSI2FD.tmp 4: C:\WINDOWS\system32\cmd.exe /C C:\TempReportingServices\SSRSSetupReports.cmd http://ta-ssrs/ReportServer
MSI (s) (08:14) [13:20:51:047]: Product: pan Enterprise Architecture SSRS Reporting -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action RunSSRSCmdScript, location: C:\WINDOWS\Installer\MSI2FD.tmp, command: C:\WINDOWS\system32\cmd.exe /C C:\TempReportingServices\SSRSSetupReports.cmd http://ta-ssrs/ReportServer

Action ended 13:20:51: RunSSRSCmdScript. Return value 3.


Now if I take the same setup project and build it on my Win XP machine, then the .msi runs fine from Win XP machines as well as Win2003 machines. Has anyone else ever run across this behavior? I am not really doing anything else in this .msi that would a certain version of a .Net Framework or anything like that.

Lorne
07-23-2008, 01:24 PM
It's most likely that the cmd.exe from one version of the OS isn't compatible with the other.

Instead of packaging the cmd.exe from your build system into your installer (which is what the "Internal binary" option does), you should call it from its existing location on the user's system.

Try using the "Full path with working folder" option instead:

[SystemFolder]cmd.exe /C C:\TempReportingServices\SSRSSetupReports.cmd [REPORTSERVER]

feiock
07-23-2008, 02:20 PM
That was it. It now works like a champ...thanks a bunch!