Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: creating a shortcut - script language  (Read 897 times)

0 Members and 1 Guest are viewing this topic.


    Topic Starter


    creating a shortcut - script language
    « on: July 10, 2010, 02:14:53 AM »
    I KNOW that "rundll32.exe shell32.dll,SHExitWindowsEx 1" can be used in a
    batchfile to close WinMe; what line would RESTART rather than CLOSE WinMe ?

    Salmon Trout


      Thanked: 963
      • Yes
    • Computer: Specs
    • Experience: Experienced
    • OS: Other
    Re: creating a shortcut - script language
    « Reply #1 on: July 10, 2010, 02:43:39 AM »
    rundll32.exe shell32.dll,SHExitWindowsEx flag

    where flag is one, or a combination of, the following numbers:

         0 - LOGOFF
         1 - SHUTDOWN
         2 - REBOOT
         4 - FORCE
         8 - POWEROFF

    These values can be added. Example: reboot = 2 and force = 4 so a forced reboot = 6

    NOTE: Using the FORCE option can cause programs to lose data.

    LOGOFF - Shuts down all running processes, then logs the user off.

    POWEROFF - Shuts down the system and turns off the power. The system must support the power-off feature.

    REBOOT - Shuts down the system and then restarts the system.

    SHUTDOWN - Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all    running processes have stopped.

    FORCE - Forces processes to terminate. When this flag is set, Windows does not query running applications to inform them that Windows is shutting down. This can cause the applications to lose data, therefore, you should only use this flag in an emergency.


      Topic Starter


      Re: creating a shortcut - script language
      « Reply #2 on: July 11, 2010, 01:03:26 AM »
      Thank you.