I have been using nssm to run a php script. I find if you run just:
nssm install ztestservice
nssm will pop up a window that lets you set all the other parameters. Otherwise, you can set the parameters separately using the set command:
nssm set <servicename> <parameter> [<subparameter>] <value>
so:
nssm set ztestservice AppParameters "C:\Stack\nginx\nginx.exe"
However, watch out. On windows 2012r2 i'm experiencing an issue where it now hangs on the stop command so i'd watch out for that!
EDIT: You can also run nssm dump ztestservice' will also give you a list of the available parameters
EDIT2: (Will i ever stop editing this?)
nssm edit ztestservice' to edit the service you just created, changing all params and having them set in the registry.