Einzelnen Beitrag anzeigen

MathiasSimmack
(Gast)

n/a Beiträge
 
#4

Re: Inno: Deinstallation abbrechen wenn Anwendung noch läuft

  Alt 15. Feb 2005, 15:35
Habe ich doch gesagt.
Zitat von Die Inno Hilfe:
This directive is used to prevent the user from installing new versions of an application while the application is still running, and to prevent the user from uninstalling a running application. It specifies the names of one or more named mutexes (multiple mutexes are separated by commas), which Setup and Uninstall will check for at startup. If any exist, Setup/Uninstall will display the message: "[Setup or Uninstall] has detected that [AppName] is currently running. Please close all instances of it now, then click OK to continue, or Cancel to exit."
Es geht um "AppMutex", btw.

Hier übrigens für alle Interessenten die Details, wie man mit JScript und VBScript (und WMI) Programme kicken kann
Code:
Dim Processes, Process

Set Processes = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery( _
   "Select * from Win32_Process WHERE Name='notepad.exe'")
' Mein herzlicher Gruß geht an die SQL-Freunde :o)

For Each Process in Processes
   WScript.Echo "killing " & Process.Name
   Process.Terminate
Next
Code:
var Processes = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2").ExecQuery(
        "Select * from Win32_Process WHERE Name='notepad.exe'");

for(Process = new Enumerator(Processes); !Process.atEnd(); Process.moveNext())
{
   WScript.Echo("killing " + Process.item().name);
   Process.item().Terminate();
}
  Mit Zitat antworten Zitat