To optimize the Windows startup, it is necessary to know precisely the time to start your PC in order to refine its settings. But rather than having your hand on the clock at boot, try this trick! You will appreciate the simplicity of implementation and accuracy of the result! This relative value will give you a benchmark for optimizing the time to start your PC.

To calculate the time you restart Windows, we will create a script VBScript (Visual Basic Scripting Edition). But before beginning the creation of the script itself, let us first on its operation.

How the script:

The script writing a value in the registry (HKCU \ Software \ Microsoft \ Current Version \ run) to be able to restart at startup. Then, another value containing the time is recorded in the registry and then reboot is launched. Restarting, the script saves time in a variable and then checks if the value containing the first time there. If yes, then you just have to compare the two time to get the startup time. Finally, the two keys are added in the register are deleted (the key run and where the key is stored hour).

Creation of the script:

Open your favorite editor (Notepad will perfectly case: Start menu, select Run ... and type notepad) and copy the following:

Option Explicit
On Error Resume Next

Sunday Wsh, time1, Time2, Result, PathFile, msgResults, MsgA, AppName, Keya, Keyb, TimeDiff

MsgA = "timing for restarting, please close all running applications and click OK."
Keya = "HKEY_CURRENT_USER \ Software \ RestartTime \"
Keyb = "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run \ RestartTime"
AppName = "Restart-Time"

Set Wsh = CreateObject ( "WScript.Shell")

PathFile = "" "" & WScript.ScriptFullName & "" ""
Result = wsh.RegRead (Keya & "Times")

if Result = "" then if Result = "" then
MsgResults = Msgbox (MsgA, vbOKCancel, AppName)
If msgResults = vbCancel then WScript.Quit
Wsh.RegWrite & "Times", left (Time, 8), "REG_SZ"
Wsh.RegWrite Keyb, PathFile, "REG_SZ"
Wsh.Run "cmd / c Shutdown-r-t 00", false, 0
Wsh.RegDelete & "Times"
Wsh.RegDelete Keya
Wsh.RegDelete Keyb
TimeDiff = DateDiff ( "s", Result, left (Time, 8))
MsgBox "PC restarted in" TimeDiff & & "seconds", vbInformation, AppName
end if


Save the file on the desktop with the name-Time.vbs Restart.

Note that the script can have the name of your choice (with the. Vbs) and can be performed anywhere on the disc (unlike the first version of the script).

Using the script:

  • Just click on the script Restart-Time.vbs on your desktop.

  • One dialog box will appears.

  • Click OK. The computer then restarts when the next dialog box appears.

  • The time to restart is then shown.

  • Note to users of Windows Vista so that the timing is done correctly, you must uncheck the box requesting confirmation to use the script when you run for the first time.

Note: This trick is usable directly in Windows 98/98 Second Edition, Windows ME, 2000 and XP and all versions of Windows using Internet Explorer 5 or higher. If this is not your case you should download from the Microsoft site version 5 of MSE (Microsoft Scripting Engines) or higher. For more information about VBS, an address: