
ENTERPRISE
12
7.
Enter the following text to create the
RunPatch
routine:
‘ ********** RUN PATCH **********
‘ The code to run the patches would occur here.
Sub RunPatch
‘ Enter code to execute the patch(es)
MsgBox “Patch has been applied”
InsertCompleteMarker
End Sub
The
RunPatch
routine is used to run the patch. Any code to start a patch can be placed into
this routine. After the patch is run, a message is sent to the user indicating the patch has been
completed. Another routine, called
InsertCompleteMarker
is run
to create a marker file to
indicate the patch has been run.
8.
Enter the following text to create the
Frozen
function:
‘ ********** 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
The
Frozen
function checks to see if Deep Freeze is Frozen. If it is Frozen, the function returns
a value of
True
. If Deep Freeze is Thawed, the function returns a value of
False
.
9.
Enter the following text to create the
BootFrozen
routine:
‘ ********** BOOT FROZEN **********
Sub BootFrozen
Set objShell = CreateObject(“Wscript.Shell”)
objShell.Run(“DFC password /BOOTFROZEN”)
End Sub
The
BootFrozen
routine is used to put computers into a Frozen State. The password in the DFC
command line must be modified to match password created for the command line control.