Skip to content

Instantly share code, notes, and snippets.

@liponex
Forked from rponte/cmd_as_windowsservice.bat
Created April 8, 2019 13:58
Show Gist options
  • Save liponex/02be828f8418cb26cd21e95ae58927ff to your computer and use it in GitHub Desktop.
Save liponex/02be828f8418cb26cd21e95ae58927ff to your computer and use it in GitHub Desktop.
running cmd.exe as a windows service
-- install cmd.exe as a windows service
sc create CmdAsService binpath= "cmd /K start" type= own type= interact
-- now execute this to run cmd.exe service
sc start CmdAsService
-- you can delete cmd.exe service with this command
sc delete CmdAsService
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment