For Programmers: Free Programming Magazines  


Home > Archive > VC Language > May 2006 > InitiateSystemShutdown returning false with Error 53









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author InitiateSystemShutdown returning false with Error 53
Usman

2006-05-31, 8:15 am

Hi

I'm calling InitiateSystemShutdown within a COM which itself is being called
from a windows service. The method returns false with GetLastError()
returning error code 53. I've tried running my service with Administrator
account but still it does'nt restart the system and give the same error. I
tried writing an ASP Page and called the COM method from it. The ASP page
was running using an administrator account. The code executed just fine
there and system got rebooted. Can anyone please tell me why is it not
running when I call the COM method from the windows service.

Regards

Usman


Alex Blekhman

2006-05-31, 7:15 pm

Usman wrote:
> I'm calling InitiateSystemShutdown within a COM which
> itself is being called from a windows service. The method
> returns false with GetLastError() returning error code
> 53. I've tried running my service with Administrator
> account but still it does'nt restart the system and give
> the same error. I tried writing an ASP Page and called
> the COM method from it. The ASP page was running using an
> administrator account. The code executed just fine there
> and system got rebooted. Can anyone please tell me why is
> it not running when I call the COM method from the
> windows service.


Error 53 is ERROR_BAD_NETPATH ("The network path was not
found."). So, if you specified machine name, then you should
have SE_SHUTDOWN_NAME/SE_REMOTE_SHUTDOWN_NAME priviledge.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com