activating msiexec.exe within isntaller - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

ycyclop
Posts: 6
Joined: Sun Apr 03, 2011 8:33 am

activating msiexec.exe within isntaller

I'm trying to run msiexec.exe using a script within the installer.

Function installer()
dim action
dim version64
dim removeAction

version64 = Session.Property("VersionNT64")
removeAction = Session.Property("REMOVE")

if removeAction <>"" then
action = "msiexec.exe /qn /uninstall " & chr(34) & Session.Property("APPDIR") & "64BitModules.msi" & chr(34)
else
action = "msiexec.exe /qn /i " & chr(34) & Session.Property("APPDIR") & "64BitModules.msi" & chr(34)
end if

MsgBox(action)

set Wsh = CreateObject("WScript.Shell")

'If the machine uses Windows 64bits
If version64 <>"" then
Wsh.Run action,1,false
End If
End Function

When I'm installing I'm doing it in the step Install IIS and everything is working fine, but when uninstalling I'm doing it in the stopsservices step and the msiexec.exe simply will not execute although it still exist in the install directory. Should I do the uninstall in a different step? is there a problem executing the msiexec while the installer is running?
Thank you
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: activating msiexec.exe within isntaller

Hello and welcome to the Advanced Installer Forums,

Unfortunately, Windows Installer does not allow two installer processes to run at the same time. In order to be able to run the second package by using "msiexec.exe" you should schedule your custom action before the "InstallExecuteSequence" or after the "InstallFinalize" standard action.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”