Loading ...
Sorry, an error occurred while loading the content.
 

Re: [NTO] Re-starting Win NT

Expand Messages
  • Jody
    Hi Ernie, ... This is from Larry Hamilton s outline that he made gathering information off the net. It is for Win95/98 though. Perhaps it will help you out
    Message 1 of 4 , Dec 4, 2000
      Hi Ernie,

      >I have a need to re-start a Windows NT system each night at
      >a predefined time. Does anyone know of a command that can be
      >used? Ideally something that can be used in Scheduled Tasks.

      This is from Larry Hamilton's outline that he made gathering information off the net. It is for Win95/98 though. Perhaps it will help you out some though. You could set a timer Clip up in NoteTab for it to run. I have never used Scheduled Tasks so I can't help you there. Try Windows Help on that topic. I just felt like giving you something to read. ;)

      Shut Down And Restart Windows
      Shortcuts to Shut Down And Restart Windows
      I know a good way to quit Windows 95 or 98 quickly: You simply create a shortcut that includes this command: rundll32.exe user,ExitWindows. This tip is even more effective if you assign a hotkey combination to the shortcut. But, can you tell me the command to use to restart Windows?

      Chris Santos
      Jakarta, Indonesia


      Normally, only programmers have access to the API functions exported by Windows function libraries (DLLs). But if a function is written in a very special way, it can be triggered using the utility program Rundll32.exe (or Rundll.exe for a 16-bit DLL). Alas, though the programmer documentation for Windows includes detailed discussions of the thousands of regular API functions, there is no similar documentation for the functions that can be called through Rundll32.exe. Still, by peeking at the insides of a DLL to learn the names of its functions, and then trying them with Rundll32.exe, you can work out some solutions by trial and error, including the requested command to restart Windows.

      A shortcut whose command line is rundll32.exe shell32.dll,SHExitWindowsEx will close all programs and prompt you to log on again. This is the fastest kind of restart, and may be sufficient. If you need a complete system reboot, use the command line rundll32.exe shell32.dll,SHExitWindowsEx 2. And to shut down and power down the system, rundll32.exe shell32.dll,SHExitWindowsEx 5. Terminating this command line with numbers other than 2 and 5 may produce other effects, but do remember the "error" in trial and error. On my modern Pentium-based PC with Advanced Power Management, terminating that command with the digit 1 shut down the system in such a way that it would not restart until it was unplugged and then plugged in again.

      To create a desktop shortcut for one of these commands, right-click the desktop to bring up the context menu and choose Shortcut from the New menu. Enter the specified command line and click the Next button. In each case the command will be rundll32.exe followed by a space and a DLL name (with or without the .dll extension), a comma, and the name of a function within the DLL. There must be no space before or after the comma, and the DLL name itself cannot contain a space. Give the shortcut an appropriate name and click Finish. You're done! If you want to change the shortcut's icon, right-click the shortcut, choose Properties from the resulting menu, and click the Change Icon button on the Shortcut tab.

      Another Rundll32 feature you may find handy is a shortcut to launch the control panel applet of your choice. The syntax for this command is:

      rundll32.exe
      shell32.dll,Control_RunDLL
      filename.cpl,@n,#

      Here filename.cpl is the name of a file containing one or more control panel applets, @n is the zero-based index of the desired applet within that file, and # is the zero-based number of the desired initial page in a multipage applet. The @n and # items are optional, though @n must be present if you want to use #. For example, ending the above command with timedate.cpl,@0,1 launches the Date/Time Properties applet (the first and only applet within Timedate.cpl) with the Time Zone page selected. The same command ending with sysdm.cpl,@0,3 launches the System Properties applet with the Performance page selected. If you make extensive use of particular applets, you can use this information to define shortcuts that launch those applets directly. Do note that the # argument to specify the initial page of a multipage applet does not work in every case.

      There are many other commands that can be launched through Rundll32.exe. If you discover one that's truly useful, don't hesitate to write and tell us about it.

      -- Neil J. Rubenking
      From the 2/23/99 issue of PC Magazine

      *******************************************

      http://www.zdnet.com/pcmag/pctech/content/solutions/oe1804a.htm

      Happy Topics,
      Jody

      The NoteTab Off-Topic List
      mailto:ntb-OffTopic-Subscribe@...
      mailto:ntb-OffTopic-UnSubscribe@...
    • Jim Hall
      Jody, Ernie, et al ... For DOS/Win95/Win98 there is a little file originally (years ago) called WARMBOOT.COM (I have since renamed it REBOOT.COM) which forces
      Message 2 of 4 , Dec 4, 2000
        Jody, Ernie, et al

        At 09:12 PM 12/4/00, you wrote:
        >Hi Ernie,
        >
        > >I have a need to re-start a Windows NT system each night at
        > >a predefined time. Does anyone know of a command that can be
        > >used? Ideally something that can be used in Scheduled Tasks.
        >
        >This is from Larry Hamilton's outline that he made gathering information
        >off the net. It is for Win95/98 though.





        For DOS/Win95/Win98 there is a little file originally (years ago) called
        WARMBOOT.COM (I have since renamed it REBOOT.COM) which forces a
        CTRL+ALT+DEL type reboot in DOS and the equivalent of a RESTART in Win95/Win98.

        I launch it from a shortcut on the desktop.

        I'm lazy and don't like to have to go through 3 menu's to reboot.

        UNFORTUNATELY I was never able to get it to work in Win2K Pro (NT4)

        If anyone wants a copy, I'd be happy to send it to you for the asking.


        Regards,

        Jim
      • Ernie
        Thanks Jody and Jim. Will try out your suggestions today Jody. Thanks Again.
        Message 3 of 4 , Dec 6, 2000
          Thanks Jody and Jim.
          Will try out your suggestions today Jody.
          Thanks Again.
        Your message has been successfully submitted and would be delivered to recipients shortly.