home *** CD-ROM | disk | FTP | other *** search
- ' ***
- ' *** ------------------------------------------------------------------------------
- ' *** Filename: toast.vbs
- ' *** ------------------------------------------------------------------------------
- ' *** Description: Runs at login by profiles configured with session timers in order
- ' *** to launch toast.hta with the proper session information message.
- ' *** ------------------------------------------------------------------------------
- ' *** Version: 1.0
- ' *** Notes:
- ' *** ------------------------------------------------------------------------------
- ' *** Copyright (C) Microsoft Corporation 2005, All Rights Reserved
- ' *** ------------------------------------------------------------------------------
- ' ***
-
- ' ~~~
- ' ~~~ Force variables to be declared
- ' ~~~
- Option Explicit
-
- Dim oShell, oArgs, iDelay, iMin, sBinDir, q
- Const TOOLKITKEY = "HKLM\Software\Microsoft\Shared Computer Toolkit\"
-
- q = Chr(34)
-
- On Error Resume Next
-
- ' ~~~
- ' ~~~ Create objects
- ' ~~~
- Set oShell = CreateObject("WScript.Shell")
- Set oArgs = Wscript.Arguments
-
- iMin = oArgs(0)
- iDelay = oArgs(1)
-
- WScript.Sleep(iDelay * 60000)
-
- sBinDir = oShell.RegRead(TOOLKITKEY & "TargetDir") & "bin"
-
- Call oShell.Run(q & sBinDir & "\toast.hta" & q & " " & iMin * 60, 1, False)
-
- ' ~~~
- ' ~~~ Destroy objects
- ' ~~~
- Set oShell = Nothing
- Set oArgs = Nothing
-