On a w2k3 server I have a service running with srvany.exe. The program runs with the AppEnvironment and AppDirectory parameters. I tried this with the sc.exe and failed.
Definition for srvany
Impage Path in Root of the service in regedit:
ImagePath REG_EXPAND_SZ c:\program files\Windows Resource Kits\Tools\srvany.exe
DisplayName REG_SZ CompanyServer_Prod
Under the parameters folder for the service I have the following definitions:
- AppDirectory REG_SZ y:\wwwservers\company.ch\server
- AppEnvironment REG_MULTI_SZ ServerData_DIR= y:\wwwservers\company.ch\data SystemRoot=c:\windows ....
- Application REG_SZ y:\wwwservers\company.ch\server\server.exe
- AppParameters REG_SZ -1y:\wwwservers\company.ch\log\serverexe.log -22 -30 -555
After I have tried with the sc.exe command, the registry was defined, but the programm didn't start, because of missing parameters. I have tried following command:
sc create CompanyServer_Prod start= auto binpath= "y:\wwwservers\company.ch\server\server.exe -1y:\wwwservers\company.ch\log\serverexe.log -22 -30 -555" DisplayName= "Company Server Prod"
Do you have any suggestion, how I can do this on a W2K8 R2 server?
The workaround: Copy the srvany.exe command on the w2k8 r2 server and it works as before on a w2k3. But I think, there are some reason that microsoft don't deploy the srvany.exe anymore.
Thanks for your help in advance
RitzoThursday, January 14, 2010 7:36 AM