-
Notifications
You must be signed in to change notification settings - Fork 1
/
DeployWiz_CaptureImage.vbs
executable file
·96 lines (71 loc) · 2.82 KB
/
DeployWiz_CaptureImage.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
' // ***************************************************************************
' //
' // Copyright (c) Microsoft Corporation. All rights reserved.
' //
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File: DeployWiz_Initialization.vbs
' //
' // Version: 6.3.8330.1000
' //
' // Purpose: Main Client Deployment Wizard Initialization routines
' //
' // ***************************************************************************
Option Explicit
Function InitializeCapture
If Ucase(Property("ComputerBackupLocation")) = "NETWORK" OR Ucase(oEnvironment.Item("ComputerBackupLocation")) = "NETWORK" Then
If Property("BackupShare") <> ""AND Property("BackupDir") <> "" Then
ComputerBackupLocation.value = Property("BackupShare") & "\" & Property("BackupDir")
ElseIF oEnvironment.Item("BackupShare") <> "" AND oEnvironment.Item("BackupDir") <> "" Then
ComputerBackupLocation.value = oEnvironment.Item("BackupShare") & "\" & oENvironment.Item("BackupDir")
Else
ComputerBackupLocation.value = Property("DeployRoot") & "\Captures"
End If
End If
If Property("ComputerBackupLocation") = "" then
ComputerBackupLocation.value = Property("DeployRoot") & "\Captures"
End if
If Property("BackupFile") = "" then
BackupFile.value = Property("TaskSequenceID") & ".wim"
End if
RMPropIfFound("BdePin")
RMPropIfFound("BdeModeSelect1")
RMPropIfFound("BdeModeSelect2")
RMPropIfFound("BdeKeyLocation")
RMPropIfFound("OSDBitLockerWaitForEncryption")
RMPropIfFound("BdeRecoveryKey")
RMPropIfFound("BdeRecoveryPassword")
RMPropIfFound("BdeInstallSuppress")
End Function
'''''''''''''''''''''''''''''''''''''
' Validate Capture
'
Function ValidateCaptureLocation
InvalidCaptureLocation.style.display = "none"
ValidateCaptureLocation = true
If not CaptureRadio1.Checked then
ComputerBackupLocation.value = ""
BackupFile.Value = ""
RMPropIfFound("ComputerBackupLocation")
RMPropIfFound("BackupFile")
Exit Function
End if
If Left(ComputerBackupLocation.value, 2) = "\\" and len(ComputerBackupLocation.value) > 6 and ubound(split(ComputerBackupLocation.value,"\")) >= 3 then
If not oUtility.ValidateConnection(ComputerBackupLocation.value) = Success then
InvalidCaptureLocation.style.display = "inline"
ValidateCaptureLocation = FALSE
End if
Else
InvalidCaptureLocation.style.display = "inline"
ValidateCaptureLocation = FALSE
End if
End Function
Function ValidateCapture
document.GetElementByID("ComputerBackupLocation").Disabled = not CaptureRadio1.Checked
document.GetElementByID("BackupFile").Disabled = not CaptureRadio1.Checked
if not CaptureRadio4.Checked then
RMPropIfFound("BdeInstall")
RMPropIfFound("BdeInstallSuppress")
End if
ValidateCapture = ParseAllWarningLabels
End Function