Hi,
I have a problem where if I run MsiExec /x{47D90718-5075-4804-ABA2-50F5D654A904} /qn from the command line it works.
If I run the same via a deferred VBscript (selected 64 bit, run under Local System Account with full privileges and wait for script to finish) it doesn't remove the program. I am running on a 64 bit Windows Server 2012 R2.
I pass in the properties to a deferred custom action through CustomActionData.
Any idea why?
Regards,
John
The script is reproduced below: -
'strText = Session.Property("CustomActionData")
The APPDIR and ProductCode variables are set to what is received from this, I have checked that they are populated with valid strings.
strFilePath = strAPPDIR & "msiexec64.exe /x" & strProductCode & " /log C:\TEMP\ju.log /qn"
Run strFilePath, strAPPDIR
Sub Run(strFile, strWorkingDirectory)
Dim shell
Const cDebug = True
If cDebug=True Then
MsgBox "Run: strFile = " & strFile
End If
Set shell = CreateObject("WScript.Shell")
shell.CurrentDirectory = strWorkingDirectory
' Now run the command 0 = Hide the window and activate another window
' False = immediately returns to script execution rather than waiting
' on the process termination (and returns an error code of 0).
' We need to wait for it to execute because we are actually deleting the
' executable as the next operation so set parameter to True.
' See http://ss64.com/vb/run.html
If cDebug = False Then
shell.Run strFile, 0, True
Else
'1 Activate and display the window. (restore size and position) Specify this flag when displaying a window for the first Time
shell.Run strFile, 1, True
End If
Set shell = Nothing
End Sub
FOLLOW US
Get the latest news in Application Packaging