21
ENTERPRISE
‘ ********** RUN PATCH **********
‘ The code to run the patches would occur here.
Sub RunPatch
‘ Enter code to execute the patch(es)
‘ The next two lines would run a program by the name of update.exe
‘ Set objShell = CreateObject(“Wscript.Shell”)
‘ objShell.Run(“update.exe”)
MsgBox “Patch has been applied”
InsertCompleteMarker
End Sub
‘ ********** DEEP FREEZE FROZEN? **********
‘ Checks to see if Deep Freeze is Frozen and returns True or False.
Function Frozen
Set objShell = CreateObject(“Wscript.Shell”)
intStatus = objShell.Run(“DFC password /ISFROZEN”, 1, True)
If intStatus = 0 Then ‘DF is Thawed
Frozen = False
Else
If intStatus = 1 Then ‘DF is Frozen
Frozen = True
Else
‘A number of other reasons.
End If
End If
End Function
‘ ********** BOOT FROZEN **********
Sub BootFrozen
Set objShell = CreateObject(“Wscript.Shell”)
objShell.Run(“DFC password /BOOTFROZEN”)
End Sub
‘ ********** BOOT THAWED **********
Sub BootThawed
Set objShell = CreateObject(“Wscript.Shell”)
objShell.Run(“DFC password /BOOTTHAWED”)
End Sub
‘ ********** INSERT MARKER **********
‘ Insert the marker file to indicate the patch is in progress.
Sub InsertMarker
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objFile = objFSO.CreateTextFile(strUNCPath & strMARKERFILE)
End Sub