Ask a Question related to PERL Miscellaneous, Design and Development.
-
Jochen Friedmann #1
shutdown or reboot computer
Hello,
how can I reboot, shutdown(PowerOff) or change the user with a Perl Script ?
Jochen Friedmann Guest
-
Flash makes my computer reboot!!
I've already posted a thread on this and got no reply. Any site I go to involving flash reboots my computer. Not instantly. If there are several ads... -
Remote shutdown not working if the computer is locked
One of the MS KB explains that it is a bug in Windows 2000 server, but it was corrected in SP3. But this problem exists in Windows 2003 std server.... -
reboot pc with PHP
Hi List I've gone through the list for previous questions and the only one that seems to be a solution is to use sudo, however, I cannot seem to... -
[PHP] reboot pc with PHP
A more easy solution is that: Make a cron that executes every minut /tmp/rreboot.sh for user root crontab -e Add the line: * * * * * ... -
Access entire desktop computer from laptop computer on wireless network
When I try to set up a network place on my laptop, I browse the locations that I want to setup in the network place set-up wizard but it wont let... -
Anno Siegel #2
Re: shutdown or reboot computer
Jochen Friedmann <jochen.friedmann2@de.bosch.com> wrote in comp.lang.perl.misc:
First answer the question how to reboot, shut down, or change the user> Hello,
>
> how can I reboot, shutdown(PowerOff) or change the user with a Perl Script ?
by any any means in your OS. Then ask yourself how to do the same things
in Perl.
Anno
Anno Siegel Guest
-
Jochen Friedmann #3
Re: shutdown or reboot computer
Oh, sorry
the OS is Win2000 or WinnNT
"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:bk478o$lt4$2@mamenchi.zrz.TU-Berlin.DE...comp.lang.perl.misc:> Jochen Friedmann <jochen.friedmann2@de.bosch.com> wrote inScript ?> > Hello,
> >
> > how can I reboot, shutdown(PowerOff) or change the user with a Perl>
> First answer the question how to reboot, shut down, or change the user
> by any any means in your OS. Then ask yourself how to do the same things
> in Perl.
>
> Anno
Jochen Friedmann Guest
-
Bernard El-Hagin #4
Re: shutdown or reboot computer
[Please don't top-post. Thanks]
Jochen Friedmann wrote:
> "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
> news:bk478o$lt4$2@mamenchi.zrz.TU-Berlin.DE...> comp.lang.perl.misc:>> Jochen Friedmann <jochen.friedmann2@de.bosch.com> wrote in> Script ?>> > Hello,
>> >
>> > how can I reboot, shutdown(PowerOff) or change the user with a Perl>>>
>> First answer the question how to reboot, shut down, or change the
>> user by any any means in your OS. Then ask yourself how to do the
>> same things in Perl.
>
> Oh, sorry
>
> the OS is Win2000 or WinnNT
I think you misunderstood. This isn't a Perl question until you find out
(and tell us) how to achieve by other means what you're trying to achieve
with Perl. And no, by "other means" I don't mean pressing the power button.
:-)
--
Cheers,
Bernard
--
echo 42|perl -pe '$#="Just another Perl hacker,"'
Bernard El-Hagin Guest
-
ko #5
Re: shutdown or reboot computer
Jochen Friedmann wrote:
Please read the posting guidelines under what you 'Really Really Should'> Hello,
>
> how can I reboot, shutdown(PowerOff) or change the user with a Perl Script ?
>
>
do before posting - you may find your answer quicker that way:
[url]http://mail.augustmail.com/~tadmc/clpmisc.shtml[/url]
Google search in comp.lang.perl.misc for 'windows shutdown' group (2nd
match) turns up the following (may be wrapped):
[url]http://groups.google.com/groups?q=windows+shutdown+group:comp.lang.perl.mis c&hl=en&lr=&ie=UTF-8&group=comp.lang.perl.misc&selm=E16x2.3175%24lx.1 210%40news2.giganews.com&rnum=2[/url]
Or you could have tried 'perldoc win32' and found the Win32
InitiateSystemShutdown() function.
HTH - keith
ko Guest
-
Cyde Weys #6
Re: shutdown or reboot computer
Jochen Friedmann wrote:
system('shutdown -h now');> Hello,
>
> how can I reboot, shutdown(PowerOff) or change the user with a Perl Script ?
>
>
system('reboot');
system("su -l $newUser");
Cyde Weys Guest
-
Thomas Kratz #7
Re: shutdown or reboot computer
"Thomas Kratz" <ThomasKratz@REMOVEwebCAPS.de> wrote in news:3f65b0db.0@juno.wiesbaden.netsurf.de...
I forgot to mention, that prior to calling Reboot or Powerdown, you'll have to call AdjustToken() first and check for success. And the print statements should be removed for production :-)>
> "Jochen Friedmann" <jochen.friedmann2@de.bosch.com> wrote in news:bk48ef$e0k$1@ns2.fe.internet.bosch.com...
>> > Oh, sorry
> >
> > the OS is Win2000 or WinnNT
> >
> The script below provides two functions for reboot and shutdown and should work for nt to xp.
>
> Thomas
ThomasThomas Kratz Guest
-
Abigail #8
Re: shutdown or reboot computer
Jochen Friedmann (jochen.friedmann2@de.bosch.com) wrote on MMMDCLXVII
September MCMXCIII in <URL:news:bk48ef$e0k$1@ns2.fe.internet.bosch.com >:
__ Oh, sorry
__
__ the OS is Win2000 or WinnNT
Oh, fastest way to shutdown Win2000 from Perl that I know is:
print "\t\t\b\b\b\b\b\b\b\b\b\b\b\b" while 1;
Although this might be fixed with some patch.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
Abigail Guest



Reply With Quote

