nsis Services

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!


When installing a new program or updating an installation, it's good practice for you to stop an installed application and anything related with it before overwriting any of its files. The same goes for services. We need to be sure that the locally run service (if any) is stopped before we can install or upgrade our program. In this topic I'll share a few macros ranging from creating a service to querying a service to removing one all together.


  • ${Service::Create} "NAME" "PATH" "TYPE" "START" "DEPEND" /DISABLEFSR $0 $1
  • ${Service::Remove} "NAME" "" $0 $1
  • ${Service::QueryConfig} "NAME" /DISABLEFSR $0 $1


NAMEThe service name
PATHBinaryPathName to the .exe file
TYPEown, share, interact, kernel, filesys, rec
STARTboot, system, auto, demand, disabled, delayed-auto
DEPENDDependencies(separated by / (forward slash))
/DISABLEFSRDisables redirection if x64. Use "" to skip.
$0Return after call
$1Return after call

Got any nsis Question?