Results 1 to 2 of 2

Thread: Measure Windows 7 Startup time with a VBS script

  1. #1
    Join Date
    May 2009
    Posts
    1,611

    Measure Windows 7 Startup time with a VBS script

    There are many tips and toolkits to help you optimize your computer and speed up its startup. To compare the situation before and after application manipulation, you can measure the startup time and shutdown of your computer. For this you can use a stopwatch, but this is not so convenient.

    You can also set up a small VBS script that will instruct your computer to stop and restart and then give you the number of seconds that the operation lasted.

    Create VBS script:

    The VBS is a scripting language supported by Windows. The script you will use will record the actual time in the registry, restart your computer and compare the new correct time with the former to give you the total duration of the restart.

    • Click the Start button, click All Programs, Accessories and then Notepad.
    • Copy and paste the following script in the Notepad:
      Code:
       <span><span style="direction: ltr; text-align: left" class="google-src-text">Option Explicit On Error Resume Next Dim Wsh, Time1, Time2, Result, PathFile, MsgResult, MsgA, AppName, KeyA, KeyB, TimeDiff MsgA = "Fermez toutes les applications en cours et cliquez sur 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 MsgResult = Msgbox (MsgA, vbOKCancel, AppName) If MsgResult = vbcancel then WScript.Quit Wsh.RegWrite KeyA & "Times", left(Time,8), "REG_SZ" Wsh.RegWrite KeyB, PathFile, "REG_SZ" Wsh.Run "cmd /c Shutdown -r -t 00", false, 0 else Wsh.RegDelete KeyA & "Times" Wsh.RegDelete KeyA Wsh.RegDelete KeyB TimeDiff = DateDiff("s",Result,left(Time,8)) MsgBox "PC redémarré en " & TimeDiff & " secondes", VbInformation, AppName end if wscript.Quit</span> Option Explicit On Error Resume Next Sun Wsh, Time1, Time2, Result, pathfile, MsgResult, MsgA, AppName, Keya, Keyb, TimeDiff MsgA = "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 Msgbox MsgResult = (MsgA, vbOKCancel, AppName) If MsgResult = vbcancel Then WScript.Quit Wsh.RegWrite Keya &" Times ", left ( Time, 8), "REG_SZ" Wsh.RegWrite Keyb, pathfile, "REG_SZ" Wsh.Run "cmd / c Shutdown-r-t 00", false, 0 else Wsh.RegDelete Keya & "Times" Wsh.RegDelete Keya Wsh . RegDelete Keyb TimeDiff = DateDiff ("s", Result, Left (Time, 8)) MsgBox "PC restarted" TimeDiff & & "seconds", vbInformation, AppName end if WScript.Quit</span>
    • Now click the File menu of the Notepad and then click Save As.
    • Scroll Type and select All Files.
    • Click the Desktop icon for the script is placed on the desktop.
    • Enter Restart-Time.vbs in the File name field and click the Save button.
    • Close the notebook.
    • The new script is present on the desktop.

  2. #2
    Join Date
    May 2009
    Posts
    1,611

    Re: Measure Windows 7 Startup time with a VBS script

    Measure the Boot Time:

    Here is how you can measure the time taken by your system to bootup:
    • Close all open software.

    • Click the right mouse button on the file-Time.vbs Restart the desktop and choose Open or Run command depending on your version of Windows.

    • Click the OK button.

    • Your computer is restarted.

    • On the next start, time to restart your computer is displayed. Click OK.


    Improve recovery time:

    To improve the time to restart Windows, you must consider the software and services launched at Windows startup. A defragmentation of your hard drives also improved access to files used for booting. With Vista, you can use your USB stick to boost Windows startup. By following the tips below, you can expect to earn a good thirty seconds to boot.

    For more info, check this out:
    1. Recommended programs to run at startup
    2. Creat Defragment Boot Files Shortcut In Vista
    3. Want to defragment C drive before Windows boot
    4. Disable unnecessary services in Windows 7
    5. Use ReadyBoost to optimize and accelerate Windows Vista

Similar Threads

  1. startup repair is taking time in windows 7
    By Ganesh Ujwal in forum Operating Systems
    Replies: 7
    Last Post: 11-03-2013, 11:10 AM
  2. Replies: 9
    Last Post: 01-04-2012, 02:32 PM
  3. Cannot find script file on windows startup
    By Ekadant in forum Operating Systems
    Replies: 3
    Last Post: 22-07-2009, 10:35 PM
  4. Replies: 1
    Last Post: 03-08-2008, 05:23 PM
  5. Startup Script or Login Script ??
    By WANNABE in forum Active Directory
    Replies: 5
    Last Post: 22-12-2006, 07:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,583,122.96732 seconds with 17 queries