ReStart Setup Program Help

Contents
3D Laser Etched Art Crystal Paperweights $5.95
Fake Security Camera Moves and Blinks $6.95
Handcuffs $2.49
Spanish Language DVDs (En Espanol) $4.95
Create Window Website
Jsnag Jpeg Capture
EquiFile FTP Client / Website Synchronizer
Add Right Click New Folder to Windows Explorer
How to Install and Run Regclean
How to Install PowerToys (Tweak UI) and Kernel PowerToys
32 bit Cyclic Redundancy Check Source Code for C++
Floppy Drive Access Bug
Restart Windows with a Shortcut
32 Bit CRC File Calculation
RegClean ReadMe.txt
Update Comctl32.dll if You Don't Have MSIE 5.x
How to Verify CRC-32 Numbers
32 Bit CRC Text Calculation
Ram Memory Usage
How to Update Win95 to Win95a
Create Window Programming Section
Freeware by -RAE-
Logon and Password Problems
ReStart Setup Program Source Code
Open Two Explorer Windows at Once
ReStart Setup Program Help
Create Window Win Info Section
Wait Text
The -RAE- Website
Create Window Freeware Section
Use FIND to Locate File References
Hot Key Assignment Bug
NoDocs Text
ShortTop Information
June 2008

Page 2 of 2. Return to page 1 to download the program.


Installation
      There is no installer program, just the files listed below that are contained in the download Zip.

RSsetup.exe      ReStart setup executable program
ReadMe.txt         description, install instructions, and licence information
File_id.diz      description required for BBS distribution
RSsetup.hlp      help file
RSsetup.cnt      contents of the help file

Use Windows Explorer to create a folder for the files, e.g. C:\Program Files\ReStart.

Extract the files from RSsetup.zip into the folder with an unzip program, e.g. WinZip, (free evaluation copy located at http://winzip.com).

Create a shortcut for RSsetup.exe or just double click the file in Explorer.

Note that ReStart setup doesn't make any entries in the Windows Registry, so uninstalling is just a matter of deleting the files.


screen shot

Quick Instructions
First time

Launch ReStart setup by double clicking the RSsetup.exe program file.

If a dialog box pops up saying that DosStart.bat contains an Exit command... just click the OK button.

If the first line in the "Contents of DosStart.bat" window starts with @Exit, then DosStart.bat is already disabled.

Otherwise, click the "Disable DosStart.bat" button.

Now click the "Create" button and wait a second or two for the ReStart Windows shortcut to appear on your Desktop.

If you want to create the ReBoot and ShutDown shortcuts, select them one at a time and click the "Create" button.

That's it, click the "Quit" button and you're all done.

If you need to re-enable DosStart.bat

Launch ReStart setup by double clicking the RSsetup.exe program file.

Click the "Enable DosStart.bat" button.

That's all, click the "Quit" button.


PC Reboots Instead of Restarting Windows
      If the PC reboots when you double click the ReStart shortcut, the most likely cause is that a device driver is being loaded by DosStart.bat. In other words, DosStart.bat isn't disabled. Run "ReStart setup" and be sure that the first line in DosStart.bat begins with @Exit. Some program installations rewrite DosStart.bat and may move or remove the @Exit command. Also, you shouldn't remove lines from DosStart.bat because some devices will detect that the line has been removed and reinsert it as the first line. For instance, my mouse driver will reinsert itself as the first line in DosStart.bat unless I leave it there as line two, or line three, etc.


What the heck is DosStart.bat?
      DosStart.bat is a batch file that automatically runs when Windows restarts in MS-DOS mode. It runs before any other programs and is usually used to load real mode DOS drivers for things like your mouse, sound card, joystick, etc. The problem it causes is that the ReStart shortcut doesn't work if any DOS drivers have been loaded. Instead, your PC must reboot in order to unload the drivers. "ReStart setup" provides an easy way to disable, or later re-enable, DosStart.bat so that the drivers never load. Without the drivers loaded, Windows is able to restart without having to reboot.

      DosStart.bat is located in your Windows directory, however, if you have never installed software that requires real mode DOS drivers the file may be absent. ReStart setup creates DosStart.bat if it doesn't already exist. When you click ReStart setup's "Disable DosStart.bat" button, it inserts an @Exit command as the first line in DosStart.bat. The @ symbol prevents the Exit command from being printed on the screen. The Exit command causes the batch file to quit before running any lines that follow.

      If you ever need to run DOS programs, such as legacy games, that can't be run while Windows is running, then you may need to re-enable DosStart.bat before launching the program from within Windows. This doesn't apply if you normally shutdown Windows before running the DOS program. Now days, there are very few programs that still require real mode DOS so most users have no use for DosStart.bat and they can leave it disabled permanently.


ReStart Shortcut
      The ReStart Windows shortcut created by "ReStart setup" is a special type of shortcut, specifically, a "Shortcut to MS-DOS Program." It's different from a shortcut to a Windows program in several ways. It has a file extension of PIF, although you will never see the file extension unless you've "hacked" your Windows Registry. PIF, or Program Information File, is a hold over from prior Windows versions. Windows 95 introduced a new type of shortcut with the LNK file extension to handle Windows programs and modified the old PIF files to handle only DOS programs.

      Without getting more technical, the most useful feature of the ReStart shortcut is that it's set to restart in MS-DOS mode. Normally, a PIF shortcut that restarts in MS-DOS mode will continue to launch a DOS program. However, this shortcut doesn't really do anything. Instead, it just quits and Windows restarts all by itself.

      There are two things that you might want to change in this shortcut. I'll assume that you already know how to change shortcut icons, but if you want to assign a Shortcut Key, "HotKey", there are a couple of extra steps.

Right click on the shortcut and select Properties

Select the Program tab

Click the Advanced button

Uncheck the box marked MS-DOS mode and click OK

Set the Shortcut Key

Now click the Advanced button again

Check the box marked MS-DOS mode, the other boxes should be unchecked

Click OK and then OK again

      Now if the Shortcut Key doesn't work, don't be too alarmed. Assigning Shortcut Keys in Windows 95/98 has never been very reliable. Sometimes rebooting, not just restarting, will help get the assignment to "take," but sometimes it just doesn't work at all. If all else fails, there is a free PC Magazine utility called HotKey Detective that might help solve the problem. Check my http://www.createwindow.com website for up to date links.


ReBoot and ShutDown Shortcuts
      Unlike the ReStart shortcut, the ReBoot and ShutDown shortcuts are normal LNK links to Windows programs. However, without getting more technical, these shortcuts call a function within a DLL, Dynamic Link Library, instead of just launching the more common EXE, executable, program. In any case, they use the same processes as when you select "Restart" or "Shut down" from the Windows Shut Down dialog box. Note that selecting "Restart" from the Shut Down dialog box actually reboots the PC rather than restarting Windows, unless you hold down the Shift key.


Running the Shortcuts from a Batch File
      Windows provides a way to launch shortcuts from within batch files. The executable program, Start.exe, should be located in your Windows Command subdirectory. This subdirectory is normally included in your environment path, so prefixing the shortcut with the word Start followed by a space will launch the shortcut. Of course, this will usually have to be the last line of your batch file.

Examples

Start "C:\Windows\Desktop\ReStart Windows.pif"

Start "C:\Windows\Desktop\ReBoot Windows.lnk"

Start "C:\Windows\Desktop\ShutDown Windows.lnk"

      Note that the ReStart shortcut has a PIF file extension, while the other two have LNK extensions. The shortcut paths are quoted because they contain spaces. Occasionally, you may need to specify the full path to Start.exe, depending on the state of your environment variables.

Example (all on one line)

"C:\Windows\Command\Start.exe" "C:\Windows\Desktop\ReStart Windows.pif"

      Here I've quoted both paths, even though the first has no spaces.


Uninstalling
      ReStart setup doesn't make any entries in the Windows Registry, so all you need to do is delete the files listed below.

RSsetup.exe
ReadMe.txt
File_id.diz
RSsetup.hlp
RSsetup.cnt

      Additionally, the Windows help file reader may have created the following files that you can safely delete at any time.

RSsetup.gid
RSsetup.fts


More Technical Stuff
      ReStart setup doesn't create the shortcuts on the fly, but instead copies them from internal templates.  This is made possible by using environment variables rather than discrete file paths.  The environment variables are set by the operating system before Windows launches and remain unchanged.  The two variables used by the shortcuts are COMSPEC and windir.  COMSPEC is defined as the path to the DOS command interpreter, Command.com.  Windir is the path to the Windows directory.  You can check the values of these variables on any Windows 95/98 machine by opening a DOS box and typing the word SET followed by the return key.  Typically, you'll see;

COMSPEC=C:\WINDOWS\COMMAND.COM
windir=C:\WINDOWS

However, they could be different, depending on the name of the directory where Windows is installed.  In any case, the variables always contain the correct path, regardless of the Windows directory name.  Therefore, the same shortcuts will work on any machine.  The remainder of this topic explains how the original shortcuts were made.

ReStart
      When Windows is installed, a shortcut named Dosprmpt.pif is created in the Windows directory.  You don't generally see the PIF file extension, but it designates the shortcut as one pointing to a DOS program, namely Command.com.  Most PCs have at least two copies of Command.com, one in the root directory of the C drive and one in the Windows directory.  The one in the root directory is for booting the PC and the one in the Windows directory is usually considered the "permanent" copy, or COMSPEC.  On a multiple boot machine the root directory copy is swapped out, depending on which operating system is going to boot.  Note that the permanent copy of Command.com can also be located somewhere other than the Windows directory by assigning it with a PATH statement in the Config.sys file.  Even if reassigned, the COMSPEC variable still points to the permanent copy.

To create the ReStart shortcut:
      Copy the Dosprmpt shortcut from the Windows directory to the Desktop
      Rename the new shortcut, ReStart Windows
      Right click and choose "Properties"
      Click the "Program" tab and give it a new internal name, ReStart Windows, on the first line
      Replace the "Cmd line" with %COMSPEC% /C
           This points the shortcut to the permanent copy of Command.com, wherever it might be.  The % symbols around COMSPEC identify it as an environment variable.  The /C switch tells it to perform the next command and then quit.  Since no command follows the /C, there is nothing to do and Command.com will simply quit.
      Click the "Advanced" button and uncheck "Suggest MS-DOS mode as necessary"
      Check the "MS-DOS mode" box
      Uncheck "Warn before entering MS-DOS mode"
      Click on "Use current MS-DOS configuration" and then the "OK" button
      Click the "Change icon" button
      Replace the "File name" with %windir%\SYSTEM\PIFMGR.DLL and click the "OK" button to refresh the icons
      Choose the thunder cloud icon and click the "OK" button again
      Finally, click the "OK" button on the main properties sheet to close the dialog box

ReBoot and ShutDown
      Windows provides a small utility that can load a Dynamic Link Library and execute internal functions one at a time.  The utility is aptly named Rundll32.exe and the DLL that contains the function to reboot or shutdown Windows is Shell32.dll, located in the System subdirectory.  The specific function within the DLL is called SHExitWindowsEx.  Because it's a function and not a file, it's name is case sensitive, so always observe proper capitalization.  The function takes several numbers as parameters, but the two most reliable ones are 2 and 5 for reboot and shutdown, respectively.  The other available parameters tend to be configuration specific and behave somewhat differently from one machine to another.

To create the ReBoot and ShutDown shortcuts:
      Locate the executable file Rundll32.exe in the Windows directory and create a shortcut for it on the Desktop
      Rename the new shortcut, ReBoot Windows or ShutDown Windows
      Right click and choose "Properties"
      Click the "Shortcut" tab if not already selected
      Replace the "Target" line with %windir%\RUNDLL32.EXE
      Add a space and then %windir%\SYSTEM\shell32.dll,SHExitWindowsEx (no space after comma)
      For the ReBoot shortcut, add a space and the number 2
      For the ShutDown shortcut, add a space and the number 5
      Replace the "Start in" line with %windir%
      Select "Minimized" on the "Run" line
      Change the icon in the same manor as with the ReStart shortcut
      Finally, click the "OK" button on the main properties sheet to close the dialog box


Return to page 1 to download the program.
This page is located online at:
ReStart Setup Program Help
Copyright © 2000 - 2008 Richard A. Ellingson