09/29/2009 2207 views
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


Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

All Answers

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?
Answered 09/29/2009 by: VBScab
Red 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.
Answered 09/29/2009 by: abking99
Second Degree Blue 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.

Answered 09/29/2009 by: pjgeutjens
Red Belt