for example "this pc will shutdown in 10 9 8 7 etc"
I have figured out the shutdown portion of this script, just can seem to
figure out the timer.
Thanks
"Byron" <start...@shaw.ca> wrote in message
news:%23naVnmd...@TK2MSFTNGP06.phx.gbl...
<HTML>
<HEAD>
<TITLE>TIMER</TITLE>
<SCRIPT LANGUAGE="VBSCRIPT">
maxTime = 10
Sub Window_OnLoad()
x=1
For a = (objTable.Rows.Length -1) to 0 Step -1
myNewRow = document.all.objTable.deleteRow(a)
Next
Set objRow = objTableBody.InsertRow()
objRow.Style.fontSize = "12px"
Set objCell = objRow.InsertCell()
timeLeft = maxTime - x
If timeLeft = 0 Then Reboot()
objCell.InnerText = TimeLeft
x=x+1
Sleep(1)
Loop
End Sub
Function Sleep(x)
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "%COMPSPEC% /c ping -n " & 1+x & " 127.0.0.1>nul", 0, 1
End Function
</SCRIPT>
</HEAD>
<BODY>
Countdown Timer:
<CENTER>
<TABLE ID="objTable" border="0" bgcolor="ThreeDHighlight">
<TBODY ID="objTableBody"></TBODY>
</TABLE>
</CENTER>
</BODY>
</HTML>