Romain
Fri Jan 07 02:30:15 CST 2005
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.
"William DePalo [MVP VC++]" <willd.no.spam@mvps.org> a écrit dans le message
de news:%23zVBI7%238EHA.3336@TK2MSFTNGP11.phx.gbl...
> "Romain TAILLANDIER" <RomainDotTaillandier_nospam@MaintagDotCom_remove>
> wrote in message news:uX4%23mO98EHA.2316@TK2MSFTNGP15.phx.gbl...
> > 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/default.asp?url=/library/en-us/sysinfo/base/initiatesystemshutdown.asp
>
> and investigate calling it from within an auto-start service.
>
> Regards,
> Will
>
>