UPDATE command

The UPDATE command permits to pass new parameters to the service without the necessity to uninstall the service and then reinstall it. Just restart the service to apply new parameters to it.

Example:

app2srv.exe UPDATE /SN="Notepad" /PM="C:\WINDOWS\system32\notepad.exe" /WD="C:\WINDOWS\system32" /SWX /ID1 /FPS /UPR  /ENV="MYVAR=testVariable" /PRE="C:\WINDOWS\system32\calc.exe|||3000" /DISP="Notepad Sample Service" /DES="Notepad Sample Service"

where:

/ENV="MYVAR=testVariable" and /PRE="C:\WINDOWS\system32\calc.exe|||3000" are new parameters which we want to pass to the service.

Full description of all the parameters is given in INSTALL command section.

Return value:
0 – if the command succeeds. Otherwise "-1" or the error code is returned.