Software shut down my PC, user authorization

  • Thread starter Thread starter Romain TAILLANDIER
  • Start date Start date
R

Romain TAILLANDIER

Hi group,

I have a Test Bench, in a workshop. It is 'embedded' with Win2000. It have
to be automatically shut down at 05h00 PM.
It can be use by different user wich have 3 profiles (user, user with power,
admin).

I want to be able to shut down the PC at 5h.
- independantly of the user or user profile
- even if nobody is logged in (during the "enter your name and password"
screen of windows)
- even if the Test Bench App is not running.
- the PC have to be shut down properly (as if the user do a start>Shut down)

I have no idea i need some links, or pists. Full working solution are also
accepted :)

thank you all for your help.
ROM
www.maintag.com
 
Romain TAILLANDIER said:
I have a Test Bench, in a workshop. It is 'embedded' with Win2000. It have
to be automatically shut down at 05h00 PM.
It can be use by different user wich have 3 profiles (user, user with
power,
admin).
...
I have no idea i need some links, or pists. Full working solution are also
accepted :)

Well, this is group has a .Net focus but it is not clear to me that you are
seeking a .Net solution. If not, take a look at the documentation for
InitiateSystemShutdown() here

http://msdn.microsoft.com/library/d...en-us/sysinfo/base/initiatesystemshutdown.asp

and investigate calling it from within an auto-start service.

Regards,
Will
 
Thank you for your help.

First i quickly success to shutdown the computer using the User32.dll API.
I wish efffectively do that in .Net, but i am open to alternative, if it is
less work.

I have intuitively look at windows service, but i am new to that technology.
But you just confirm i seem to be on the rigth way, thanks :)

I have to start the AutoShutDownService before any user have logged in, is
it possible ?
(becaus ethe PC must shut down even if nobody is logged in)

Is it possible to send an event at 5h ?
or must i try to look at time on the start and wait until 5h ?
or check time every 10 minutes ?

in others words what is the best way to detect it is 5h ?

Thank you for your help.
 
Romain TAILLANDIER said:
I have intuitively look at windows service, but i am new to that
technology.
But you just confirm i seem to be on the rigth way, thanks :)

Well, services run quite apart from any user logon session of any type
(local, terminal services etc) so it seemed to fit you requirements. In
addition you can set them so that they are launched automatically. It may be
due to my bias and my experience but a native service is the way I'd go.

On the other hand, the resource kit used to contain (still does?) a handy
tool called SRVANY

http://support.microsoft.com/kb/q137890/

which uses an MS service to launch any application in a context similar to,
but not the same as would be the case if it had been a service.
Is it possible to send an event at 5h ?
or must i try to look at time on the start and wait until 5h ?
or check time every 10 minutes ?

I'd simply compute the interval between 5 AM and the applications launch
time and wait for it to expire.

Regards,
Will
 
Back
Top