OpenSCManager FAILED 1722 RPC server is unavailable; windows services
am 12.10.2007 18:14:41 von tj
I created a windows service using VS2005.
I created/adjusted the install class using the designer controls.
I set the user to be 'local system'.
I installed the service using the VS2005 cmd console (installutil.exe).
The service shows up fine in my services snap-in.
I can start and stop it just fine and it works great when I start it.
I can open a command window and type: net start "My Service" and net stop
"My Service" and it works great.
I have a program that must start the service like this:
c:\windows\system32\sc.exe \\mymachinename start "My Service"
Now is when my problem arises. Using the sc.exe (like in the line above) to
start/stop the service throws the following error:
[SC] OpenSCManager FAILED 1722:
The RPC server is unavailable.
This is on Win2003SvrSP1
Using some rpc tools in the Windows Resource Kit didn't reveal anything -
though I don't have much experience w/ those tools and could have not
testing something correctly.
The RPC server service is started. Again, my custom windows service works
just fine if I start/stop in the mmc or use 'net start/stop' from a command
line. I just can't for the life of me get sc.exe to start/stop it w/o
throwing that 'RPC server is unavailable' error.
I mean everything was done clean and out of the box. It's practically a
HelloWorld windows service created in VS2005 C# and immediately installed
using installutil.exe all self contained on a single Win2003Svr machine.
This should be a textbook helloworld windows service. Does anyone know how
I can use sc.exe to start/stop w/o throwing that awful error?
Re: OpenSCManager FAILED 1722 RPC server is unavailable; windows services
am 15.10.2007 17:50:05 von tj
Because the service I'll be calling is installed on the same machine as the
bat file that is calling it, I don't necessarily have to use sc.exe and it's
remote capabilities. But I also can't use net start/stop either. But I
found netsvc.exe in one of the old nt resource toolkits - and it does
exactly what I need it to do.
"TJ" wrote in message
news:OGGLDsODIHA.3712@TK2MSFTNGP02.phx.gbl...
>I created a windows service using VS2005.
> I created/adjusted the install class using the designer controls.
> I set the user to be 'local system'.
> I installed the service using the VS2005 cmd console (installutil.exe).
> The service shows up fine in my services snap-in.
> I can start and stop it just fine and it works great when I start it.
> I can open a command window and type: net start "My Service" and net stop
> "My Service" and it works great.
>
> I have a program that must start the service like this:
> c:\windows\system32\sc.exe \\mymachinename start "My Service"
>
> Now is when my problem arises. Using the sc.exe (like in the line above)
> to start/stop the service throws the following error:
> [SC] OpenSCManager FAILED 1722:
> The RPC server is unavailable.
>
> This is on Win2003SvrSP1
> Using some rpc tools in the Windows Resource Kit didn't reveal anything -
> though I don't have much experience w/ those tools and could have not
> testing something correctly.
> The RPC server service is started. Again, my custom windows service works
> just fine if I start/stop in the mmc or use 'net start/stop' from a
> command line. I just can't for the life of me get sc.exe to start/stop
> it w/o throwing that 'RPC server is unavailable' error.
>
> I mean everything was done clean and out of the box. It's practically a
> HelloWorld windows service created in VS2005 C# and immediately installed
> using installutil.exe all self contained on a single Win2003Svr machine.
> This should be a textbook helloworld windows service. Does anyone know
> how I can use sc.exe to start/stop w/o throwing that awful error?
>