home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / free_security / msshared / Shared_Computer_Toolkit_ENU.msi / FileBin012 < prev    next >
Encoding:
Text (UTF-16)  |  2005-09-02  |  2.7 KB  |  47 lines

  1. ' ***
  2. ' *** ------------------------------------------------------------------------------
  3. ' *** Filename:        toast.vbs
  4. ' *** ------------------------------------------------------------------------------
  5. ' *** Description:    Runs at login by profiles configured with session timers in order
  6. ' ***                to launch toast.hta with the proper session information message.
  7. ' *** ------------------------------------------------------------------------------
  8. ' *** Version:        1.0
  9. ' *** Notes:        
  10. ' *** ------------------------------------------------------------------------------
  11. ' *** Copyright (C) Microsoft Corporation 2005, All Rights Reserved
  12. ' *** ------------------------------------------------------------------------------
  13. ' ***
  14.  
  15. ' ~~~ 
  16. ' ~~~ Force variables to be declared 
  17. ' ~~~ 
  18. Option Explicit
  19.  
  20. Dim oShell, oArgs, iDelay, iMin, sBinDir, q
  21. Const TOOLKITKEY = "HKLM\Software\Microsoft\Shared Computer Toolkit\"
  22.  
  23. q = Chr(34)
  24.  
  25. On Error Resume Next
  26.  
  27. ' ~~~ 
  28. ' ~~~ Create objects
  29. ' ~~~ 
  30. Set oShell = CreateObject("WScript.Shell")
  31. Set oArgs = Wscript.Arguments
  32.  
  33. iMin = oArgs(0)
  34. iDelay = oArgs(1)
  35.  
  36. WScript.Sleep(iDelay * 60000)
  37.  
  38. sBinDir = oShell.RegRead(TOOLKITKEY & "TargetDir") & "bin"
  39.  
  40. Call oShell.Run(q & sBinDir & "\toast.hta" & q & " " & iMin * 60, 1, False)
  41.  
  42. ' ~~~ 
  43. ' ~~~ Destroy objects
  44. ' ~~~ 
  45. Set oShell = Nothing
  46. Set oArgs  = Nothing
  47.