Jump to content











Photo
- - - - -

Command Line Shutdown/Reboot


  • Please log in to reply
7 replies to this topic

#1 robinj

robinj

    Newbie

  • Members
  • 16 posts
  • Location:London
  •  
    United Kingdom

Posted 11 October 2007 - 02:09 PM

Hello,

I was trying to create an Autoit script for use in LiveXP that automates a few tasks. When done, I wanted it to shutdown or reboot LiveXP. Does anyone know a simple way to do this? Autoit tries to use Shutdown which is not part of default build so it fails, then I tried using various DLL calls using rundll32. Only one I can find is the one that brings up the standard shutdown GUI which you still have to respond to.

Must be someway of doing this since Ghost can do it.....

Thanks for any ideas

Robin

#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 11 October 2007 - 02:27 PM

Hello,

I was trying to create an Autoit script for use in LiveXP that automates a few tasks. When done, I wanted it to shutdown or reboot LiveXP. Does anyone know a simple way to do this? Autoit tries to use Shutdown which is not part of default build so it fails, then I tried using various DLL calls using rundll32. Only one I can find is the one that brings up the standard shutdown GUI which you still have to respond to.

Must be someway of doing this since Ghost can do it.....

Thanks for any ideas

Robin


Why do you not simply add shutdown.exe (21 kB) to the build?

Peter

#3 robinj

robinj

    Newbie

  • Members
  • 16 posts
  • Location:London
  •  
    United Kingdom

Posted 11 October 2007 - 02:30 PM

Why do you not simply add shutdown.exe (21 kB) to the build?

Peter


I did try that, but it seems to require a bunch of dll to run, and when I added them all in, it still would not do it.

Thanks

Robin

#4 DaemonForce

DaemonForce

    Frequent Member

  • Advanced user
  • 120 posts
  • Location:SEA
  • Interests:[=D=] has been gone for ages along with .NET 1.0. I may bring it back depending on the amazing people here.
  •  
    United States

Posted 11 October 2007 - 02:55 PM

Why do you not simply add shutdown.exe (21 kB) to the build?

Shutdown does not work in the protected Windows environment.

I was trying to create an Autoit script for use in LiveXP that automates a few tasks. When done, I wanted it to shutdown or reboot LiveXP. Does anyone know a simple way to do this?

As long as your default shell is CMD you can have the shell run 'exit' upon completion.

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 11 October 2007 - 02:57 PM

I did try that, but it seems to require a bunch of dll to run, and when I added them all in, it still would not do it.

Thanks

Robin

Did you already try autoit let ProcessClose the shell (Peloader or Explorer, depending on your build)?

Peter

#6 robinj

robinj

    Newbie

  • Members
  • 16 posts
  • Location:London
  •  
    United Kingdom

Posted 11 October 2007 - 03:00 PM

Did you already try autoit let ProcessClose the shell (Peloader or Explorer)?

Peter


No I did not try that. Will give it a go right now and see if it works...

Robin

#7 DaemonForce

DaemonForce

    Frequent Member

  • Advanced user
  • 120 posts
  • Location:SEA
  • Interests:[=D=] has been gone for ages along with .NET 1.0. I may bring it back depending on the amazing people here.
  •  
    United States

Posted 11 October 2007 - 03:03 PM

Did you already try autoit let ProcessClose the shell (Peloader or Explorer)?

I hope he's not using Explorer.

I once set the default shell to Explorer. No winpeshl or peloader or anything in the background like that. Just the explorer shell. It died in the middle of a filecopy.

*Pff! Reboot!*

Never again. =/

I'm using a resource delimiter on all my builds.

#8 robinj

robinj

    Newbie

  • Members
  • 16 posts
  • Location:London
  •  
    United Kingdom

Posted 11 October 2007 - 03:11 PM

No I did not try that. Will give it a go right now and see if it works...

Robin


OK nice one. A process close on PELoader.exe instigates an immediate reboot.

Thanks for the quick ideas...

Robin




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users