How to Test Your Computer's Reboot Time
Welcome, Guest. Please login or register. Did you miss your activation email?


Britec Computer Tech Help Support Forums  « Software Support « Programming or Coding « How to Test Your Computer's Reboot Time
Pages: [1]
  Print  
Author Topic: How to Test Your Computer's Reboot Time  (Read 1464 times)
Britec
Administrator
Hero Member
*****
Posts: 3496



View Profile
« on: May 31, 2010, 11:40:07 AM »

How to Test Your Computer's Reboot Time

This works for both XP, Vista and Windows 7

1. Open Notepad and copy everything in the code box below and paste it in Notepad.

Code:
Option Explicit
On Error Resume Next
Dim Wsh, Time1, Time2, Result, PathFile, MsgResult, MsgA, AppName, KeyA, KeyB, TimeDiff
MsgA = "Please close all running applications and click on OK."
KeyA = "HKEY_CURRENT_USER\Software\RestartTime\"
KeyB = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\RestartTime"
AppName = "[GeekPolice] Reboot 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 "Your computer reboots in " & TimeDiff & " seconds", VbInformation, AppName
end if
wscript.Quit

2. Save the file as Reboot Time.vbs on anywhere, your desktop for example. You can choose to save the file as any name you want, just make sure the file ends with a .vbs  extension.

Or Download Reboot Time.vbs


How to use

<a href="http://www.youtube.com/watch?v=7-Xi85cxPnU" target="_blank">http://www.youtube.com/watch?v=7-Xi85cxPnU</a>
« Last Edit: May 31, 2010, 11:44:31 AM by Britec » Logged



BJseal91
Hero Member
*****
Posts: 699



View Profile
« Reply #1 on: June 06, 2010, 11:51:02 PM »

Great Script Thanks for this it is A1

did you wright the script youself or did you get it from a website if so what was the website and was there any more on there

Many Thanks

Bradley
Logged
davedudeit
Sr. Member
****
Posts: 387



View Profile
« Reply #2 on: December 03, 2010, 02:45:45 PM »

very usefull.
Logged
Raptor
Newbie
*
Posts: 29


View Profile
« Reply #3 on: April 07, 2012, 08:24:38 PM »

Thanks Britec

93 seconds I`m Happy with my old computer

Raptor
Logged
Pages: [1]
  Print  
 
Jump to: