home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / free_security / msshared / Shared_Computer_Toolkit_ENU.msi / FileBin004 < prev    next >
Encoding:
Extensible Markup Language  |  2005-09-02  |  6.6 KB  |  112 lines

  1.  ■<?xml version="1.0" ?>
  2. <package>
  3.     <comment>
  4.     ' ***
  5.     ' *** ------------------------------------------------------------------------------
  6.     ' *** Filename:        banner.wsf
  7.     ' *** ------------------------------------------------------------------------------
  8.     ' *** Description:    Displays a full screen banner
  9.     ' *** ------------------------------------------------------------------------------
  10.     ' *** Version:        1.0
  11.     ' *** ------------------------------------------------------------------------------
  12.     ' *** Copyright (C) Microsoft Corporation 2005, All Rights Reserved
  13.     ' *** ------------------------------------------------------------------------------
  14.     ' ***    
  15.     </comment>
  16.     <job>
  17.         <?job error="True" debug="False" ?>
  18.         <script language="VBScript" src="../include/Common.vbs"></script>
  19.         <script language="VBScript" src="../include/libWSF.vbs"></script>
  20.         <script language="VBScript" src="../include/clsDiskProtect.vbs"></script>
  21.         <script language="VBScript">
  22.         <![CDATA[
  23.             ' ~~~ 
  24.             ' ~~~ Force variables to be declared 
  25.             ' ~~~ 
  26.             Option Explicit
  27.             InitialiseAllObjects()
  28.             
  29.             ' ~~~
  30.             ' ~~~ Declare variables and constants
  31.             ' ~~~
  32.             Dim oDiskProtect, iWDPcmdver, sAppDir, oIE
  33.             Dim sCmd1, sCmd2, sCmd3
  34.         
  35.             iWDPcmdver = 9
  36.             Set oDiskProtect = New DiskProtect
  37.             sAppDir   = RegRead(TOOLKITKEY & "TargetDir")
  38.             If Not(oDiskProtect.Enabled) Then
  39.                 ' ~~~ ------------------------------------------------------------------------------
  40.                 ' ~~~ Delete any WDP AT commands left behind
  41.                 ' ~~~ ------------------------------------------------------------------------------
  42.                 Call oDiskProtect.DefineATCommands
  43.                 sCmd1 = oDiskProtect.sCmd1
  44.                 sCmd2 = oDiskProtect.sCmd2
  45.                 sCmd3 = oDiskProtect.sCmd3
  46.                 Call oDiskProtect.DeleteScheduleTask(sCmd1)
  47.                 Call oDiskProtect.DeleteScheduleTask(sCmd2)
  48.                 Call oDiskProtect.DeleteScheduleTask(sCmd3)
  49.                 Call oShell.Run(chr(34) & sAppDir & "bin\schtasks.exe" & chr(34) & " /Delete /TN SCTWakeUpPC /F", 0, True)
  50.                 QuitScript()
  51.             End If
  52.             ' ~~~ create internet explorer object and file system object
  53.             Set oIE  = WScript.CreateObject("InternetExplorer.Application", "ie_")
  54.             ' ~~~ set internet explorer object display options
  55.             oIE.AddressBar  = False
  56.             oIE.FullScreen  = True
  57.             oIE.MenuBar     = False
  58.             oIE.Resizable   = False
  59.             oIE.StatusBar   = False
  60.             oIE.ToolBar     = False
  61.             oIE.TheaterMode = False
  62.             ' ~~~ load about:blank
  63.             oIE.Navigate(Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")) & "banner.htm")
  64.             ' ~~~ display window
  65.             oIE.Visible = True
  66.             ' ~~~ wait a while
  67.             WScript.Sleep(10000)
  68.             ' ~~~ quit ie
  69.             oIE.Quit
  70.             If WScript.Arguments.Named.Exists("Restart") Then
  71.                 If Right(RegRead("HKLM\System\CurrentControlSet\Services\WDPOperations\parameters\Application"),7) = "restore" Then
  72.                     ' ~~~ reboot the machine in 60 secs
  73.                     WScript.Sleep(60000)
  74.                     Call oDiskProtect.Reboot
  75.                 Else
  76.                     QuitScript()
  77.                 End If
  78.             End If
  79.             ' ~~~ ------------------------------------------------------------------------------
  80.             ' ~~~ Destroy objects
  81.             ' ~~~ ------------------------------------------------------------------------------
  82.             Set oDiskProtect = nothing
  83.             Set oIE = nothing
  84.             UnLoadObjects()    
  85.         ]]>
  86.         </script>
  87.     </job>
  88. </package>