Bug in the script

I am using below script for installation as well as uninstallation. When I trigger it for installation, it directly gives me installation completed message, but continues installation. When I trigger it for uninstallation, it completes whole uninstallation and then gives completed message. It is little bit strange.

If fso.fileexists(Execpath1) = 0 then

i = WshShell.run (ExecPath,1,true)

If (i = 0) Or (i = 3010) then

MsgBox "Visual Studio 2003 Enterprise Arch. Installed Successfully: " & i



MsgBox "Visual Studio 2003 Enterprise Arch. failed with error code: " & i


End If

End if

0 Comments   [ + ] Show comments

Answers (3)

Posted by: anonymous_9363 13 years ago
Red Belt
It is little bit strange.Why? If the EXE returns 0 or 3010, you'll get the MsgBox displayed. If the EXE were returning something other than 0 or 3010 and displaying it, THAT would be strange...

BTW, if the script is ultimately calling an MSI, why not do the job properly and use the WindowsInstaller.Installer object's ProductState property?
Posted by: abking99 13 years ago
Second Degree Blue Belt
Actually it is for, VisualStudio2003 ent. arch. So i have created unattend file, and doing installation of setup.exe with that unattendfile. Execpath is containing the same command.
Strange part is for uninstallation, I am using the same script, and at the time of uninstallation, after completing whole uninstallation, it gives completed message, and here it is giving in the beginning.
Posted by: pjgeutjens 13 years ago
Red Belt
It's possible that the setup.exe, when installing, actually calls msiexec (or something else) and doesn't wait for it to finish, So you get the return value right after you've STARTED the installation. Perhaps the mechanism for uninstall is different.

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