Knowledgebase / FAQ - ip-connect GmbH
Knowledgeroot - Version: 0.9.9.5
Menü verstecken Menü ausklappen Menü neuladen Menü einklappen
Menü schliessen
  1.Kill a Windows Service    (Zuletzt geändert von dspr an 27.07.2012 15:13:26)

Killing a Windows Service that seems to hang on "Stopping"

It sometimes happens (and it's not a good sign most of the time): you'd like to stop a Windows Service, and when you issue the stop command through the SCM (Service Control Manager) or by using the ServiceProcess classes in the .NET Framework or by other means (net stop, Win32 API), the service remains in the state of "stopping" and never reaches the stopped phase. It's pretty simple to simulate this behavior by creating a Windows Service in C# (or any .NET language whatsoever) and adding an infinite loop in the Stop method. The only way to stop the service is by killing the process then. However, sometimes it's not clear what the process name or ID is (e.g. when you're running a service hosting application that can cope with multiple instances such as SQL Server Notification Services). The way to do it is as follows:

  1. Go to the command-prompt and query the service (e.g. the SMTP service) by using sc:

    sc queryex SMTPSvc
  2. This will give you the following information:

    SERVICE_NAME: SMTPSvc
            TYPE               : 20  WIN32_SHARE_PROCESS
            STATE              : 4  RUNNING
                                    (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
            WIN32_EXIT_CODE    : 0  (0x0)
            SERVICE_EXIT_CODE  : 0  (0x0)
            CHECKPOINT         : 0x0
            WAIT_HINT          : 0x0
            PID                : 388
            FLAGS              :


    or something like this (the "state" will mention stopping).
  3. Over here you can find the process identifier (PID), so it's pretty easy to kill the associated process either by using the task manager or by using taskkill:

    taskkill /PID 388 /F

    where the /F flag is needed to force the process kill (first try without the flag).

Please be careful when you do this; it's useful for emergencies but you shouldn't use it on a regular basis (use it as a last chance to solve the problem or to avoid the need of a reboot in an exceptional situation). It can even be used to stop a service that has the "NOT-STOPPABLE" and/or "IGNORES_SHUTDOWN" flag set (e.g. Terminal Services on a Windows Server 2003 is non-stoppable), at least when it's not hosted in the system process. You can query all this information by means of the sc command.

verschieben [Oben]

  2.Erweiterte Datenträgerbereinigung unter Vista / Windows 7    (Zuletzt geändert von rsch an 01.01.2013 04:38:33)

Wie bereits unter Vista, gibt es bei Windows 7 die Möglichkeit die Datenträgerbereinigung zu erweitern.
Die Standard Datenträgerbereinigung erreicht man unter:
Start/ Programme/ Zubehör/ Systemprogramme/ Datenträgerbereinigung

Nach der Auswahl des gewünschten Laufwerkes benötigt das Programm einige Zeit, um alle notwendigen Informationen zusammenzutragen.



Standardmässig können diese Dateien zum löschen angewählt werden:

- Heruntergeladene Programmdateien
- Temporäre Internetdateien
- Offlinewebseiten
- Ruhezustandsdateibereinigung
- Debug Dump Files
- Papierkorb
- Setup Log Files
- Systemfehler-Speicherabbilddateien
- Kleine Systemfehler Speicherabbilddateien
- Temporäre Dateien
- Miniaturansichten
- Windows Fehlerberichtserstattungsdatei bereinigen
- Dateien in Fehlerberichtwarteschlange bereinigen

Allerdings zeigt Ihnen das Programm nicht alle Optionen an. Es gibt weitere Optionen, die Sie nutzen können indem Sie auf Ihrem Desktop mit der rechten Maustaste eine neue Verknüpfung (als Namen z.B. Datenträgerbereinigung Professional) anlegen. Geben Sie als Pfad dann folgendes an:

C:\Windows\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

Mit der Erweiterten Datenträgerbereinigung stehen Ihnen dann noch zusätzlich diese Optionen zur Verfügung:

- Temporary Setup Files
- Alte CHKDSK-Dateien
- Vorherige Windows-Installation(en)
- Temporäre Windows-Installationsdateien
- Beim Windows-Upgrade verworfene Dateien

verschieben [Oben]

  3.BitLocker Drive Encryption    (Zuletzt geändert von rszy an 10.01.2014 14:38:26)

How to Turn BitLocker On or Off, Windows 7 - Anleitung - BitLocker Drive Encryption.pdf

Wenn man braucht "Bitlocker Verschlüsselung" und "PIN am Start", soll man "Enable_No_TPM.reg" anlassen.

BitLocker Drive Encryption.pdf [814,42 KB] [rszy - 22. September 2023 22:35:46]
Enable_No_TPM.zip [357 B] [rszy - 25. September 2023 16:34:44]
Default_Require_TPM.zip [352 B] [rszy - 03. October 2023 20:33:47]
verschieben [Oben]