Windows Services einrichten mit NSSM

tiny-tool.de
Was ist NSSM?
NSSM ermöglicht es, verschiedene Arten von Anwendungen – von einfachen Skripten bis hin zu komplexen Applikationen – als Windows-Dienste zu registrieren. Besonders praktisch ist das, wenn man sicherstellen möchte, dass wichtige Programme kontinuierlich im Hintergrund laufen, auch nach einem Neustart des Systems.
Vorteile von NSSM
- Benutzerfreundlichkeit: Eine intuitive GUI, die das Einrichten von Diensten erleichtert.
- Vielseitigkeit: Unterstützung für eine breite Palette von Anwendungen, von Skripten bis zu Java-Applikationen.
- Zuverlässigkeit: Sicherstellung, dass wichtige Programme im Hintergrund laufen, auch nach einem Systemneustart.
Werbung/Advertising
Office 2021 Home and Student

Preis: 19,90 EUR
Zum AngebotVisio 2019 Professional

Preis: 14,90 EUR
Zum AngebotWindows Server 2022 CALS

Preis: 99,90 EUR
Zum AngebotOffice 2024 Home

Preis: 44,90 EUR
Zum AngebotWindows Server 2016

Preis: 99,90 EUR
Zum AngebotWindows Server 2022 RDS CALS

Preis: 109,90 EUR
Zum AngebotWindows Server Standard 2022

Preis: 194,90 EUR
Zum AngebotWindows 10/11 Pro

Preis: 19,90 EUR
Zum AngebotKaspersky Mobile

Preis: 25,00 EUR
Zum AngebotBitdefender Premium VPN

Preis: 90,00 EUR
Zum AngebotESET NOD32 Antivirus

Preis: 50,00 EUR
Zum AngebotOffice 2021 Professional

Preis: 19,90 EUR
Zum AngebotOffice 2019 Home and Student

Preis: 19,90 EUR
Zum AngebotOffice 2016 Home and Business

Preis: 14,90 EUR
Zum AngebotPinnacle Studio 26 (2023) STANDARD Windows / Deutsch

Preis: 110,00 EUR
Zum AngebotWindows Server 2016 CALS

Preis: 64,90 EUR
Zum AngebotMcAfee VPN Safe Connect

Preis: 30,00 EUR
Zum AngebotWindows Server 2016 RDS CALS

Preis: 64,90 EUR
Zum AngebotWindows Server 2019 CALS

Preis: 87,90 EUR
Zum AngebotOffice 2024 Professional

Preis: 39,90 EUR
Zum AngebotTrend Micro Antivirus + Security

Preis: 20,00 EUR
Zum AngebotMicrosoft Powerpoint 2019

Preis: 29,90 EUR
Zum AngebotOffice 2021 Professional Plus f?r 3 Ger?te

Preis: 23,50 EUR
Zum AngebotOffice 2021 Home and Business

Preis: 24,90 EUR
Zum AngebotMicrosoft Office 2021 Standard

Preis: 24,90 EUR
Zum AngebotOffice 2021 Professional Plus + Windows 11 Professional Bundle

Preis: 24,90 EUR
Zum AngebotMicrosoft Windows Server 2022 Datacenter

Preis: 219,00 EUR
Zum AngebotWindows 10 Home

Preis: 14,90 EUR
Zum AngebotCorelCAD 2021 Upgrade Windows/Mac ESD

Preis: 180,00 EUR
Zum AngebotAVG TuneUp ESD

Preis: 25,00 EUR
Zum AngebotMicrosoft Word 2019

Preis: 14,90 EUR
Zum AngebotOffice 2019 Professional plus

Preis: 39,90 EUR
Zum AngebotOffice 2021 Professional Plus

Preis: 19,90 EUR
Zum AngebotMicrosoft Windows Server 2022

Preis: 349,90 EUR
Zum AngebotOffice 2016 Professional

Preis: 14,90 EUR
Zum AngebotAVG Internet Security

Preis: 25,00 EUR
Zum AngebotmySteganos Online Shield VPN

Preis: 55,00 EUR
Zum AngebotBitdefender Antivirus Plus

Preis: 50,00 EUR
Zum AngebotAdobe Acrobat Standard 2020 OEM

Preis: 900,00 EUR
Zum AngebotOffice 2019 Professional Plus

Preis: 14,90 EUR
Zum AngebotAVG Ultimate

Preis: 25,00 EUR
Zum AngebotWindows Server 2019 RDS CALS

Preis: 93,90 EUR
Zum AngebotMicrosoft Word 2021

Preis: 14,90 EUR
Zum AngebotAvast Premium Security

Preis: 20,00 EUR
Zum AngebotOffice 2019 Home and Business

Preis: 19,90 EUR
Zum AngebotWindows 10 Pro

Preis: 14,90 EUR
Zum AngebotPanda Dome Essential MD

Preis: 15,00 EUR
Zum AngebotOffice 2021 Professional Plus + Windows 11 Professional GRATIS

Preis: 24,90 EUR
Zum AngebotOffice 2019 Professional

Preis: 39,90 EUR
Zum AngebotWindows 11 Pro

Preis: 14,90 EUR
Zum AngebotWatchdog Anti-Malware Vollversion

Preis: 25,00 EUR
Zum AngebotWindows 10/11 Home

Preis: 14,90 EUR
Zum AngebotNorton 360 Deluxe inkl. 25GB MD

Preis: 25,00 EUR
Zum AngebotMcAfee Internet Security

Preis: 25,00 EUR
Zum AngebotMcAfee Total Protection

Preis: 15,00 EUR
Zum AngebotPanda Dome Advanced MD

Preis: 15,00 EUR
Zum AngebotMicrosoft Word 2016

Preis: 14,90 EUR
Zum AngebotWindows 11 Home

Preis: 19,90 EUR
Zum AngebotMicrosoft Excel 2021

Preis: 19,90 EUR
Zum AngebotMicrosoft Office 2019 Standard

Preis: 19,90 EUR
Zum AngebotVisio 2016 Professional

Preis: 14,90 EUR
Zum AngebotAdobe Photoshop Elements 2025

Preis: 190,00 EUR
Zum AngebotOffice 2016 Home and Student

Preis: 14,90 EUR
Zum AngebotMicrosoft Excel 2019

Preis: 14,90 EUR
Zum AngebotOffice 2024 Professional Plus

Preis: 29,99 EUR
Zum AngebotPanda Dome Complete MD

Preis: 25,00 EUR
Zum AngebotEin Beispiel zur Einrichtung eines Windows-Dienstes mit NSSM
Angenommen, du möchtest ein Python-Skript als Windows-Dienst einrichten. Hier ist eine Schritt-für-Schritt-Anleitung, wie du das mit NSSM machen kannst:
- NSSM herunterladen und entpacken:
- Lade NSSM von der offiziellen Webseite herunter: NSSM Download
- Entpacke die ZIP-Datei an einen Ort deiner Wahl, z.B.
C:\nssm
.
- Python-Skript vorbereiten:
- Stelle sicher, dass dein Python-Skript bereit ist und sich an einem geeigneten Ort befindet, z.B.
C:\scripts\mein_script.py
.
- Stelle sicher, dass dein Python-Skript bereit ist und sich an einem geeigneten Ort befindet, z.B.
- NSSM verwenden, um das Skript als Dienst zu registrieren:
- Öffne eine Eingabeaufforderung mit Administratorrechten.
- Navigiere zu dem Verzeichnis, in dem sich NSSM befindet:
cd C:\nssm
- Führe den folgenden Befehl aus, um das Python-Skript als Dienst zu registrieren:
nssm install MeinPythonDienst
- Ein GUI-Fenster von NSSM öffnet sich. Gib die folgenden Informationen ein:
- Path: Pfad zu deiner Python-Installation, z.B.
C:\Python39\python.exe
- Startup directory: Verzeichnis deines Skripts, z.B.
C:\scripts
- Arguments: Pfad zu deinem Skript, z.B.
mein_script.py
- Path: Pfad zu deiner Python-Installation, z.B.
- Optionale Konfigurationen:
- In den zusätzlichen Tabs des NSSM-GUI kannst du weitere Einstellungen vornehmen, z.B. Umgebungsvariablen, Abhängigkeiten und Startparameter.
- Dienst starten:
- Nachdem du die Konfiguration abgeschlossen hast, klicke auf „Install service“.
- Starte den Dienst entweder über das NSSM-GUI oder über die Eingabeaufforderung:
nssm start MeinPythonDienst
Weitere Informationen
Ein Beispiel zur Anwendung von NSSM findest du auch in meinem Blogpost „Intelligente Bildüberwachung„. Dort wird beschrieben, wie man eine Bildüberwachungssoftware, bestehend aus einem Node.js-Script und einer Java-Applikation, kontinuierlich im Hintergrund laufen lässt.
Weitere Informationen zu NSSM und die Möglichkeit zum Download findest du hier: NSSM Website