Jump to content











Photo
- - - - -

Command line tool to shutdown \ reboot Windows PE


  • Please log in to reply
13 replies to this topic

#1 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 239 posts

Posted 30 August 2011 - 09:36 AM

ExitPE, the command line tool is designed especially for Windows PE 1.x series to shutdown or reboot the system. ExitPE is not intended for normal Windows installations as it does not notify the applications.

The tool has a small size of 2 Kb and it can be used in environments like multiPE_XP with default shell cmd.exe


Usage :


   	ExitPE -s : shutdown PE

   	ExitPE -r : reboot

Click here to download the tool.

#2 pscEx

pscEx

    Platinum Member

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

Posted 30 August 2011 - 11:48 AM

Thanks!

I'll add it to the project.

Peter

#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14178 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 August 2011 - 12:53 PM

But, provided that the user is not entirely demented and closes the apps, it should work on "normal XP" too? :unsure:

I am thinking it could be an addition/option to XPCLI :dubbio::
http://reboot.pro/3717/

:cheers:
Wonko

#4 homes32

homes32

    Gold Member

  • .script developer
  • 1028 posts
  • Location:Minnesota
  •  
    United States

Posted 30 August 2011 - 02:36 PM

Thanks for sharing! :)
impressive size!

ShutdownPE can also be used from the commandline, with the /shutdown /reboot switches, can be used with either PE1/PE2/PE3 and can be used in a normal windows environment as it will detect and perform a "proper" shutdown.

Regards,
Homes32

#5 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 239 posts

Posted 30 August 2011 - 04:07 PM

Hi Peter,

Thanks for adding the tool to the project.

Hi Wonko,

ExitPE is based on an undocumented ntdll API named NtShutdownSystem. My tool can terminate normal Windows setups but I cannot say that it's totaly safe to terminate a regular Windows session with NtShutdownSystem. As a compensation, I am posting two additional small tools based on ExitWindowsEx API and COM object IShellDispatch

Hi homes32,

Your tool is a nice work and it targets both PE and non-PE systems. Probably, I should later add a code portion to detect the running system if it's Win PE or Windows.

The tools : ShutdownWinBox displays the Windows shutdown dialog box and it works on PE systems providing GUI shell and regular Windows systems.
ShutdownWin works only on normal Windows installations. ExitWindowsEx is inactive on Windows PE ( at least this what my tests are showing. )

Attached Files



#6 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 239 posts

Posted 30 August 2011 - 05:27 PM

Hi allanf,

Thanks for testing the tool on WinPE 3.1 It works on PE3 and probably on PE2 too.

ShutdownWinBox doesn't work in WinPE 3.1 if there is no graphical interface. Running a full explorer shell probably activates the COM interface necessary for ShutdownWinBox.

LATER : I perfomed an analysis with Ollydbg on a PE 1.x built with the shell cmd.exe and CoCreateInstance reported 80040154h - ERROR_SXS_SECTION_NOT_FOUND

After this error message, the methods provided by IShellDispatch cannot run.

#7 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 239 posts

Posted 06 September 2011 - 08:45 PM

Here is version 1.1

Executable size reduced to 1.5 Kb

#8 paraglider

paraglider

    Gold Member

  • .script developer
  • 1718 posts
  • Location:NC,USA
  •  
    United States

Posted 07 September 2011 - 11:56 AM

I am impressed. Did not know anybody still used assembly language for programming. Last time I programmed in assembly language was in the 1980's.

#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14178 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 September 2011 - 01:24 PM

I am impressed. Did not know anybody still used assembly language for programming. Last time I programmed in assembly language was in the 1980's.


We are all (positively) impressed. :)

The actual point I cannot understand is WHY people like you that had the knowledge quitted using it. :( (I mean for simple, straight little programs/tools).

I will probably never be able to get the hang of it, but I wish I could write something in it.

JFYI, see what can be done in 164352 bytes
http://www.quickersoft.com/donkey/
http://www.quickerso...winexplorer.htm
File +Registry explorer

but check also how useful can be a 4096 byte program:
http://www.quickerso...sm_projects.htm
http://www.quickerso...Directories.zip

:cheers:
Wonko

#10 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 239 posts

Posted 07 September 2011 - 06:34 PM

Hi Wonko,

Today's modern assembly is not difficult to learn and use. Have a look at Iczelion's Win32 Assembly tutorial set. They are focussing on using Win32 API to code in assembly language. You will see that Iczelion's approach is similar to Petzold's Programming Windows.

http://win32assembly.../tutorials.html

MS Masm and the compatibles Pelle's Poasm and Japheth's Jwasm are supporting high level constructs and macros making easier to program in assembly

#11 maanu

maanu

    Gold Member

  • Advanced user
  • 1133 posts
  •  
    Pakistan

Posted 07 September 2011 - 07:08 PM

may be the old guys here still remember PECMD from a chinese guy . it is backbone of their PE's , i am currently using it with
PE 1.X and PE 3.0 .

it supports shutdown and reboot . VERY instant .

#12 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 239 posts

Posted 07 September 2011 - 07:38 PM

Hi maanu,

Are you referring to this topic?

http://reboot.pro/14395/

If it's possible, kindly could present an explanation on how to use this tool?

#13 paraglider

paraglider

    Gold Member

  • .script developer
  • 1718 posts
  • Location:NC,USA
  •  
    United States

Posted 08 September 2011 - 12:38 AM

Soon as command line parameters are required and you need to start manipulating strings it becomes difficult using pure assembly language. Also sharing source between win32 and win64 is probably not possible.

Not saying you can't do it - after all I wrote low level operating system code / device drivers in assembly language - but its much harder.

#14 ludovici

ludovici

    Silver Member

  • .script developer
  • 610 posts
  • Location:France
  •  
    France

Posted 08 September 2011 - 07:39 AM

Hello maanu ;)
it supports shutdown and reboot . VERY instant .
Can you explain how use PECMD ?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users