PDA

View Full Version : Run Program not working when EXE on CD/DVD (subtitle = brain fart)



NewsArchive
04-09-2011, 12:53 AM
Having a serious brain fart...

I know this should work. I used the sql2008expr include to package SQL with
our install. I wanted to give the user to install his aftermarket version
of SQL via my installer. Simple enough... just set the folder/exe to the
cd/dvd drive, and go, right? hmm....

Here is my code, to make sure what I am getting:

Display Message Box "Run Program
%SQL2008_SETUPFOLDER%\%SQL2008_SETUPEX..." -- "I will run..."
Run Program %SQL2008_SETUPFOLDER%\%SQL2008_SETUPEXE%
%SQL2008EXPR_COMMANDLINE% (Always Install) [Wait]

I get the message, and all the info looks correct. But the installer just
ends, like the "run program" didn't do anything at all.

My display message gives me:
D:\setup.exe /qs /ACTION=Install
/FEATURES=SQLENGINE,AS,BIDS,CONN,IS,BC,SDK,SSMS,ADV _SSMS,SNAC_SDK /ENU
/ERRORREPORTING="False" /INSTANCENAME="MYINSTANCENAME"
/INSTANCEID="MYINSTANCENAME" /INSTANCEDIR="C:\Program Files\Microsoft SQL
Server" /SECURITYMODE="SQL" /SQMREPORTING="False" /SAPWD="MYHIDDENPASSWORD"
/AGTSVCACCOUNT="NT AUTHORITY\SYSTEM" /ISSVCACCOUNT="NT AUTHORITY\SYSTEM"
/ASSVCACCOUNT="NT AUTHORITY\SYSTEM" /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"
/AGTSVCSTARTUPTYPE="Manual" /ISSVCSTARTUPTYPE="Automatic"
/ASSVCSTARTUPTYPE="Automatic" /SQLSVCSTARTUPTYPE="Automatic"
/BROWSERSVCSTARTUPTYPE="Automatic" /RSSVCSTARTUPTYPE="Automatic"
/SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /ADDCURRENTUSERASSQLADMIN
/IAcceptSQLServerLicenseTerms

I also dumped this to a txt file, and tried to run it manually from command
prompt, and it worked fine.

So, what am I missing? doing something wrong with Run Program?

Run Program Screen Shot attached.

Any help is appreciated. (of course, as always, this was due yesterday.
someone just shoot me?)
Thanks,
--Glenn.

NewsArchive
04-10-2011, 01:10 AM
Hi Glenn,

I would check %_SB_ERRORCODE% and %_SB_RETURNEX% to see if the CreateProcess
Windows API returns any (error code) value.

Friedrich

NewsArchive
04-12-2011, 12:44 AM
Interestingly enough, changing to ShellExecuteEX fixed it.
Thanks.

Glenn Paschal