Watch for running processes
I have created a package that installs a home grown plugin for Outlook. The package works great except my manager wants it to pop up a warning if outlook is currently running. My Question is how do I detect if the process is running from within the MSI and pause the installation until it is closed. I am currently using Wise package Studio 5.1 to create the package and using ZENWorks 3.2 to push the install
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
MSIPackager
19 years ago
Hi,
We had a similar situation when we repackaged Adobe Acrobat (PDF Author) - had to stop the acrotray.exe process during the uninstall. We used embedded vbscript in the execute deferred sequence after StartServices:
--------------
Set ProcessSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_Process")
ProcessName = "AcroTray.exe"
For Each Process In GetObject("winmgmts:{impersonationLevel=impersonate}!//localhost").ExecQuery("select * from Win32_Process where Name='" & ProcessName & "'")'
Process.Terminate
Next
--------------
Hope this helps,
Rob.
We had a similar situation when we repackaged Adobe Acrobat (PDF Author) - had to stop the acrotray.exe process during the uninstall. We used embedded vbscript in the execute deferred sequence after StartServices:
--------------
Set ProcessSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_Process")
ProcessName = "AcroTray.exe"
For Each Process In GetObject("winmgmts:{impersonationLevel=impersonate}!//localhost").ExecQuery("select * from Win32_Process where Name='" & ProcessName & "'")'
Process.Terminate
Next
--------------
Hope this helps,
Rob.
Posted by:
ILikeStuff
19 years ago
Thanks Rob.
I ended up writing an autoit script to pop up a dialog during the install Execute sequence that pauses the install until the user closes Outlook. I don't think a Partner would look too fondly upon us killing outlook if (s)he is in the middle of crafting a lengthy email. :)
Question, why did you stick the script in the execute deferred sequence?
I ended up writing an autoit script to pop up a dialog during the install Execute sequence that pauses the install until the user closes Outlook. I don't think a Partner would look too fondly upon us killing outlook if (s)he is in the middle of crafting a lengthy email. :)
Question, why did you stick the script in the execute deferred sequence?
Posted by:
MSIPackager
19 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.