Shutdown via Screensaver

  • Thread starter Thread starter BUR
  • Start date Start date
B

BUR

I am trying to make a screensaver shutdown the computers in our domain.
I have found several screensavers on the Internet, and they all claim to
make use of Force Shutdown.
When a user is logged on, it works all right, even when the user has open
apps and/or files.
BUT: When no user is logged on at all, nothing hapens. The screensaver
starts all right, makes it's specific kind of countdown, and then, for some
reason, it can not shutdown the computer.
By guess is that it has to do with the setting of some kind of local user
rights.

Anyone - any ideas ?

Regards, Bjørn, Denmark
 
When no user is logged on to the system, there are no credentials in use to validate whether the system is allowed to be shut down, or not. This can be controlled through Group Policies. Computer Configuration, Windows Settings, Security Settings, Local Policies, User Rights Assignment. Look in the right pane for Shut down the system. Add System to the list of users/groups that are allowed to shutdown the computer and see if that resolves your problem.
 
Why don’t you write a "screen saver" your self?
I will even give you the code I would use (asuming your writing it in
C++ and then Visual C++ 6).
#include <iostream>
using namespace std;

int main()
{
system("shutdown -s -f");
return 0;
}
Once compiled to exe, rename the exe file to scr (scrs are exes), put
it in the system32 directory, specifie the screen saver. Hay presto!
when ever the screen saver activiats, the computer shuts down! You
will also have to specifie this as the default screen saver for when
no one is logged in, this can be changed in registray key
HKEY_USERS.DEFAULTControl PanelDesktop.
 
Tanks, that was also my guess.
But it does not work. I have given SYSTEM the right to Shut down the system,
it didn't work, then I also gave Everyone the permission. Still it does not
work.

Any other ideas ?

Regards Bjørn, Denamrk


"Doug Knox MS-MVP" <[email protected]> skrev i en meddelelse
When no user is logged on to the system, there are no credentials in use to
validate whether the system is allowed to be shut down, or not. This can be
controlled through Group Policies. Computer Configuration, Windows
Settings, Security Settings, Local Policies, User Rights Assignment. Look
in the right pane for Shut down the system. Add System to the list of
users/groups that are allowed to shutdown the computer and see if that
resolves your problem.
 
Thanks, but the idea is not user-friendly enough.
I think that if a user is actually logged in, he/she should have some kind
of warning (1 to 2 minutes), before shutdown.

Regards, Bjørn
 
Thanks, but the idea is not user-friendly enough.
I think that if a user is actually logged in, he/she should
have some kind
of warning (1 to 2 minutes), before shutdown.

Regards, Bjørn



"Sparda" <[email protected]> skrev i en
meddelelse

You could write one in Visual basic then, using the same method,
except, you have a single form, that has one button on it (the cancle
button) then a timer on that form that counts down from 2 moniets to
zero seconds, and once it’s got to zero seconds, it executes the
shell command to forcivly shut down (shutdown -s -f). The problem
using this is that it will forcivly close programs, so if it shutsdown
the computer and a user dosnt notice, then it will lose any work they
havent saved.
 
Sparda said:
You could write one in Visual basic then, using the same
method, except, you have a single form, that has one button on
it (the cancle button) then a timer on that form that counts
down from 2 moniets to zero seconds, and once it's got to zero
seconds, it executes the shell command to forcivly shut down
(shutdown -s -f). The problem using this is that it will
forcivly close programs, so if it shutsdown the computer and a
user dosnt notice, then it will lose any work they havent
saved.

Infact, just to see how easy it is, I just wrote it now, it’s faily
simple, and looks like this:
Version 0.5 (origional desighn):
http://sparda.hopto.org/shutdown.png

Version 1.0 (better desighn):
http://sparda.hopto.org/shutdown1.png

I wrote it in VB .NET, if you don’t have VB .net, I can rewrite it
for VB 6, if you don’t have either, then I can give you the compiled
exe (along with the source), but one, (at least from your point of
view) it should be classed as untrust worthy (since I’m not an
expert programmer, nor am I a company that publishes programs), and
two if you need to edit the shutdown timer, you would have to ask some
one with VB 6 or .NET to change it in the source.
 
Thanks a lot!.
My colleague returns from holiday on monday. I will ask him to program it.
He programs both .NET and VB6.
The interesting thing is: Will it work?
What i mean: All the other screensaver worked fine with someone logged in.
But not at the login screen. For some reason the screensaver is not allowed
to shutdown the computer.

I have tried to use shutdown from my one client to remotely shutdown another
client, it works fine. So my guess still is that is has to do with some kind
of user rights.

Regard, Bjørn, Denmark
 
You could also try a Scheduled Task which can be done from the command line
[see link below] for XP Pro computers and distributed via Group Policy
"startup" script. For instance try schtasks /create /tn autoshutdown /tr
"shutdown -s" /sc onidle /i 60 /ru "system" which would shutdown a computer
that has been idle for 60 minutes . --- Steve

http://support.microsoft.com/default.aspx?scid=kb;en-us;814596
 
Back
Top