-1

I have a wix application running.and when i am trying to uninstall it,it should prompt for close the application.I would like to kill the msiexec.exe after it prompts.Right now it prompts to close but as soon as i close the dialog box it shows there is some problem in the script and later Fatal error during installation comes.Please help me...

<CustomAction Id="Show" Script="vbscript">

<![CDATA[

set service = GetObject ("winmgmts:")

for each Process in Service.InstancesOf ("Win32_Process")

If Process.Name = "CAS.exe" or Process.Name = "CMSS.exe"

then

msgbox "CAS  is running...Please close it before uninstalling"

 WScript.quit

End If

next

]]>

    </CustomAction>

        <InstallExecuteSequence>
         <Custom Action="Show" After="FindRelatedProducts">REMOVE</Custom>
    </InstallExecuteSequence>
Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
Deepthi
  • 1
  • 1

1 Answers1

0

You can create an msi log file to determine which specific custom action failed during installation.

I would recommend not using

WScript.Quit

Instead, use

Exit For

for example.

If CMSS.exe and CAS.exe are not running, then set an msi property and then in your wxs file, specify a condition that checks the value of that property to determine if the next dialog should be displayed for example.

Rami A.
  • 10,302
  • 4
  • 44
  • 87