WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Services

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

wntSvcCreate Error 531 Invalid Parameter


Question:

Everytime I attempt to install a service where specify the domain\username and password for the ServiceStartName|Password parameters I get "Extender Error 531: Invalid Parameter".

Unfortunately, it doesn't state which parameter is invalid, but I'm guessing it involves the username/password parameters because this does not work:

sDrive = "D"
sCurrClient = "\\computername"

svcStrVals = StrCat("RMAService", "|", "KS Remote Monitoring Agent", "|", "%sDrive%:\rma-win\rma.exe /service", "|", "", "|", "Domain\Administrator", "|", "Password")

svcType = 256|16
svcStartType = 2
svcErrControl = 0
svcNumVals = StrCat(svcType, @TAB, svcStartType, @TAB, svcErrControl)

wntSvcCreate(sCurrClient, svcStrVals, svcNumVals, "", "")
However, if I change
svcStrVals = StrCat("RMAService", "|", "KS Remote Monitoring Agent", "|", "%sDrive%:\rma-win\rma.exe /service", "|", "", "|", "Domain\Administrator", "|", "Password")
To
svcStrVals = StrCat("RMAService", "|", "KS Remote Monitoring Agent", "|", "%sDrive%:\rma-win\rma.exe /service", "|", "", "|", "LocalSystem", "|", "")
I have no problems whatsoever. Notice, all I have done is change "Domain\Administrator" to "LocalSystem" and blank out the password.

What parameter is invalid here? I would just leave the service installed as localsystem, but I may need the service to have network access rights or domain admin rights in the near future.

Answer:

You specified the service type to interactive(256). And yet you want it to run under a specific user account so that it can have network access.
svcType = 256|16
A service cannot have both network access using a user account and have interactive desktop access at the same time. Remove 256 from the service type:
svcType = 16 

Article ID:   W17077
File Created: 2007:07:03:14:28:08
Last Updated: 2007:07:03:14:28:08