I have a custom action in an MSI, which runs a VB script, which, in turn, runs some commands.. However, the first command gets executed OK, everyting after that just doesn't seem to run.

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")

' Remove older SAP version..
WSHShell.Run"c:\windows\SAPwksta\setup\sapsetup.exe /uninstall /silent", 0, true

' ECL viewer Install
' WSHShell.Run"msiexec /i ecl\SAP_ECL_Viewer.msi ALLUSERS=1 /qb!", 0, true

' Install new GUI
WSHShell.Run"gui_6.40\setup\sapsetup /p:{4D7AEC86-A6A3-47FA-9F55-D289F69F33E1} /sms /silent", 0, true

Wscript.Quit(0)


Is the problem the calling of MSIexec from the script, the patchs to the MSI's, or something just wrong with the code..? If i run the VB manually, it does run.. [8D]
Thanks!
0 Comments   [ + ] Show Comments

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.

Answers

0
Hi Neo,
At first sight I see that the second and third commands doesn't have the path complete as the first does, have you tried with the complete path? (c:\.........)

Hope it helps

KrisBcn
Answered 03/20/2007 by: KrisBcn
Purple Belt

Please log in to comment
0
Hi Neo,
where are you trying to call this Custom Action (InstallExecuteSequence or InstallUISequence, which line)?
Be aware, that calling a second MSI works only on certain stages of an MSI installation (trough the InstallUISequence and only after InstallFinalize in the InstallExecuteSequence).
Regards, Nick
Answered 03/21/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
ORIGINAL: KrisBcn
Hi Neo,
At first sight I see that the second and third commands doesn't have the path complete as the first does, have you tried with the complete path? (c:\.........)

Hope it helps

KrisBcn

Have tried that, same problem.. [8D] Going to have a lookl at the vb script again, maybe some weird issue there.. :P

ORIGINAL: nheim

Hi Neo,
where are you trying to call this Custom Action (InstallExecuteSequence or InstallUISequence, which line)?
Be aware, that calling a second MSI works only on certain stages of an MSI installation (trough the InstallUISequence and only after InstallFinalize in the InstallExecuteSequence).
Regards, Nick


The CA is placed in the execute immediate after the installfinalize. So i guess that shouldn't be a problem. The CA has installexecutesequence sequence 6650. Haven't tried changing that actually. Haven't even crossed my mind.. Might have to fiddle around with that i guess.. Thanks for the help!
Answered 03/22/2007 by: neo2000
Purple Belt

Please log in to comment
0
And trying this script directly runs ok?
Does the msi install any of the executed data in the script?
Answered 03/22/2007 by: KrisBcn
Purple Belt

Please log in to comment
0
Hi Neo,
your almost there. :-)
Please add +192 (async + no wait for completion) to the type of the CA. That will do the trick!
Regards, Nick
Answered 03/22/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
ORIGINAL: nheim

Hi Neo,
your almost there. :-)
Please add +192 (async + no wait for completion) to the type of the CA. That will do the trick!
Regards, Nick

Well, all is set ok, but i still can't get it to work. Somehow, one process doesn't seem to wait till the other is finished.. Could my vbscript be the problem..?


Remove older SAP version..
WSHShell.Run"c:\windows\SAPwksta\setup\sapsetup.exe /uninstall /silent", 0, true


..Removed the wscript.quit(0)

Is it OK to use the RUN command from within the MSI..? Almost looks like the "True" (wait for the program to finish) isn't interpreted OK. The first command get run, the second (calling another instance of MSIexec) seems to bomb out. Any alternatives for the wshshell.run? [&:]

If i run the script manually, everything is OK.. Oddly enough.

Edit: I see 3 instances of msiexec running under useraccount (i'm trying to run the script under a user account with admin priviledges) and 1 instance under the system account. (the service) Is 4 instances of msiexec the max. number of allowed instances..?
Answered 03/26/2007 by: neo2000
Purple Belt

Please log in to comment
0
Okay, fixed it.. Somehow, the vb script seems too long..? Or maybe the script the script doesn't wait after every commandline to finish. I guess the latter.
After chopping up the vb script into multiple scipts and adding them one by one as separate custom actions, they do run without problems.. Thanks all!
Answered 03/29/2007 by: neo2000
Purple Belt

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