Windows XP SP3, IS 2009 Premier SP2, InstallScript project I'm registering and starting a service in the OnMoved event handler. I set SERVICE_IS_PARAMS.nStartServiceWaitCount to 20 seconds, since the service can hang in certain situations. ServiceAddService succeeds (it adds and starts the service), but returns a -1 result. If I don't specify nStartServiceWaitCount, then everything is fine. If I tell ServiceAddService not to start the service, and call ServiceStartService separately, then the Add succeeds, while the Start returns the -1. As before, the service starts, but the function returns -1 anyway. Calling GetExtendedErrInfo directly afterwards gives me 1060 (The specified service does not exist as an installed service). What am I doing wrong?
... View more