From: Kellie Fitton on
Allan,

Here is someThing interesting from MSDN's webSite:

"Note The InitiateSystemShutdownEx function can be used only if the
system supports
the power-off feature."

Kellie.

From: Allan Bruce on

"Kellie Fitton" <KELLIEFITTON(a)YAHOO.COM> wrote in message
news:1120181895.229251.193300(a)g43g2000cwa.googlegroups.com...
> Allan,
>
> Here is someThing interesting from MSDN's webSite:
>
> "Note The InitiateSystemShutdownEx function can be used only if the
> system supports
> the power-off feature."
>
> Kellie.
>

I think 99% of systems do these days - all of my machines are atx, and fully
power-off without having to press the power button. I think I am going to
have to write a small listening client on each machine and connect to the
listener to say 'reboot'. Pity, because the way I was trying was a much
neater solution.
Allan


From: TC on


Allan Bruce wrote:

> I think the code I use gets the privilege, but I could be wrong.


In which case, that would explain your problem, no?

Why not focus on the obvious probable cause of the error you're
getting: insufficient priviliges to perform the operation you're
trying?

HTH,
TC

From: Allan Bruce on

"TC" <aatcbbtccctc(a)yahoo.com> wrote in message
news:1120223824.977466.323710(a)f14g2000cwb.googlegroups.com...
>
>
> Allan Bruce wrote:
>
>> I think the code I use gets the privilege, but I could be wrong.
>
>
> In which case, that would explain your problem, no?
>
> Why not focus on the obvious probable cause of the error you're
> getting: insufficient priviliges to perform the operation you're
> trying?
>
> HTH,
> TC
>

I am not getting 'insufficient priveleges', I am getting 'access denied'.
The denied access could be a privlege problem, but also likely could be a
'not possible', 'network error' or many others. As I said, I *think* I have
been granted the priveleges ok, there is no fault in asking for them
therefore I dont think it is a privelege problem.

There appears to be no documentation about this problem, and it seems as if
nobody else has found a solution to this either. I am getting close to
giving up this method and having a listener on each machine that I want to
reboot, which is not as nice a solution but should work more easily.

Allan


From: Allan Bruce on

"Allan Bruce" <amb(a)abc.net> wrote in message
news:kLKdnRV6fOWiRFzfRVnyrA(a)pipex.net...
> Is there a way I can remotely reboot one of my machines? I have setup a
> TV server but occasionally the software serving the TV crashes and I would
> like to remotely reboot the machine. I could have remote desktop access
> to another machine on the network but would prefer to run apache and use
> it to remotely reboot.
>
> Thanks
> Allan
>

I finally got this working thanks to a suggestion from somebody in another
newsgroup. It turns out that my code works perfectly well apart from that
the remote computers need to have a small change to allow remote access.
This can be changed by typing 'gpedit.msc' in the run dialog, then
navigating to:

Computer Configuration/Windows Settings/Security Settings/Local
Policies/Security Option/Network access: Sharing and security model for
local accounts

and then changing the type to 'classic'.
All works great now :o)

Allan