/build/static/layout/Breadcrumb_cap_w.png

VB in custom action bombs out..

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

Answers (7)

Posted by: KrisBcn 17 years ago
Purple Belt
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
Posted by: nheim 17 years ago
10th Degree Black Belt
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
Posted by: neo2000 17 years ago
Purple Belt
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!
Posted by: KrisBcn 17 years ago
Purple Belt
0
And trying this script directly runs ok?
Does the msi install any of the executed data in the script?
Posted by: nheim 17 years ago
10th Degree Black Belt
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
Posted by: neo2000 17 years ago
Purple Belt
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..?
Posted by: neo2000 17 years ago
Purple Belt
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!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ