This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Function to check whether an application is running or not while uninstalling.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 19, 2011
03:46 AM
Function to check whether an application is running or not while uninstalling.
Hi All,
How do we can check whether an ".exe" is executing or not while uninstallation.
For example: When my uninstaller code is launched it should check for "abc.exe" is executing or not if it is executing i need to set message box the abc.exe is working now please close abc.exe and try uninstall again.
I need function in IS2011 to check abc.exe is presently running or not.
Please help me, Thanks in advance.
Phani
How do we can check whether an ".exe" is executing or not while uninstallation.
For example: When my uninstaller code is launched it should check for "abc.exe" is executing or not if it is executing i need to set message box the abc.exe is working now please close abc.exe and try uninstall again.
I need function in IS2011 to check abc.exe is presently running or not.
Please help me, Thanks in advance.
Phani
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 19, 2011
12:14 PM
You can use a vbscript to check
/////////////////////////////////////////
Sample Code which checks if notepad.exe is running
/////////////////////////////////////////
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'Notepad.exe'")
For Each objProcess in colProcessList
MsgBox "Notepad is runnning..."
Next
/////////////////////////////////////////
Sample Code which checks if notepad.exe is running
/////////////////////////////////////////
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'Notepad.exe'")
For Each objProcess in colProcessList
MsgBox "Notepad is runnning..."
Next
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)