@@ -36,62 +36,65 @@ On Error Goto 0
36
36
Function ZTIProcess()
37
37
38
38
Dim sVersion,sArch,sFile
39
+ Dim sPrefix
39
40
Dim sInstallName, sInstallerPath
40
41
Dim sLogFolder,sLogName,sLogPath
41
- Dim sLog2Name,sLog2Path
42
- Dim sPatch,sPatchPath
42
+ Dim sCertRootInstaller,sCertRootInstallerPath
43
+ Dim sCertDirPath,sSettingsPath
44
+ Dim sRegCmd
43
45
44
46
'// Apply Architecture arguments:
45
47
'If no argument provided check for MDT/SCCM variable
46
48
'If no variable or argument is provided, defualt to x86
47
49
If oUtility.Arguments.Exists("arch") Then
48
- sArch = oUtility.Arguments("arch")
50
+ sArch = LCase( oUtility.Arguments("arch") )
49
51
ElseIf oEnvironment.Exists("Architecture") Then
50
- sArch = oEnvironment.Item("Architecture")
52
+ sArch = LCase( oEnvironment.Item("Architecture") )
51
53
Else
52
54
sArch = "x86"
53
55
End If
54
56
57
+ ' check if MDT variable exists
58
+ If oUtility.Arguments.Exists("prefix") Then
59
+ sPrefix = LCase(oUtility.Arguments("prefix"))
60
+ ElseIf oEnvironment.Exists("Prefix") Then
61
+ sPrefix = oEnvironment.Item("Prefix")
62
+ End if
63
+
64
+
55
65
'// Variables:
56
66
'// Change if needed
57
- sVersion = "1.4.32 "
67
+ sVersion = "1.4.33 "
58
68
sArch = "x64"
59
69
60
70
If sArch = "x64" then
61
- sFile = "SCM_"& sVersion & "_64Bit_S.msi"
62
- Else
63
- sFile = "SCM_"& sVersion & "_32Bit_S.msi"
64
- End If
65
-
66
- If sArch = "x64" then
67
- sPatch = "SCM_1.4.33_64Bit_S_RC4.msi"
71
+ sFile = "SCM_"& sVersion & "_64Bit_S_RC4.msi"
68
72
Else
69
- sPatch = "SCM_1.4.33_32Bit_S_RC4 .msi"
73
+ sFile = "SCM_" & sVersion & "_32Bit_S_RC4. .msi"
70
74
End If
75
+
71
76
72
77
If sArch = "x64" then
73
- sCertRoot = "InstallRoot_v3.16.3Sx64.exe "
78
+ sCertRootInstaller = "InstallRoot_SIPR_5.2x64.msi "
74
79
Else
75
- sCertRoot = "InstallRoot_v3.16.3S.exe "
80
+ sCertRootInstaller = "InstallRoot_SIPR_5.2x32.msi "
76
81
End If
77
82
78
83
sInstallName = "90Meter"
79
84
80
85
sInstallerPath = oUtility.ScriptDir & "\Source\" & sVersion & "\" & sFile
81
- sPatchPath = oUtility.ScriptDir & "\Source \" & sVersion & "\" & sPatch
82
- sCertRootPath = oUtility.ScriptDir & "\Configs\" & sCertRoot
86
+ sCertRootInstallerPath = oUtility.ScriptDir & "\Configs \" & sCertRootInstaller
87
+ sCertDirPath = oUtility.ScriptDir & "\Certs\"
83
88
84
89
'// Build log path (incase not used in task sequence)
85
- If oEnvironment.Item("_SMSTSLogPath") = "" Then
86
- sLogFolder = oEnv("TEMP") & "\AppLogs"
87
- Else
90
+ If oEnvironment.Exists("_SMSTSLogPath") Then
88
91
sLogFolder = oEnvironment.Item("_SMSTSLogPath") & "\AppLogs"
92
+ Else
93
+ sLogFolder = oEnv("TEMP") & "\AppLogs"
89
94
End If
90
95
oUtility.VerifyPathExists sLogFolder
91
96
sLogName = Replace(sInstallName & "_" & sVersion & "_" & sArch & ".log"," ","")
92
97
sLogPath = sLogFolder & "\" & sLogName
93
- sLog2Name = Replace(sInstallName & "_Patch_" & sVersion & "_" & sArch & ".log"," ","")
94
- sLog2Path = sLogFolder & "\" & sLog2Name
95
98
96
99
97
100
'// Start the process
@@ -106,31 +109,77 @@ Function ZTIProcess()
106
109
'// Disable Zone Checks
107
110
oEnv("SEE_MASK_NOZONECHECKS") = 1
108
111
109
- iRetVal = oUtility.RunWithHeartbeat("msiexec /i """ & sInstallerPath & """ /qn /norestart /l*v """ & sLogPath & """")
112
+ iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Configs\Control_Vault\CVHCI64.exe"" /S /v/qn")
113
+
114
+ iRetVal = oUtility.RunWithHeartbeat("msiexec /q ALLUSERS=2 /m MSIHARSK /i """ & sInstallerPath & """ /l*v """ & sLogPath & """")
110
115
111
116
if (iRetVal = 0) or (iRetVal = 3010) then
112
117
113
- iRetVal = oUtility.RunWithHeartbeat("msiexec /i """ & sPatchPath & """ /qn /norestart /l*v """ & sLog2Path & """")
118
+ ZTIProcess = Success
114
119
115
- if (iRetVal = 0) or (iRetVal = 3010) then
116
- ZTIProcess = Success
117
- iRetVal = oUtility.RunWithHeartbeat("""" & sCertRootPath & """ /s")
118
-
119
- 'oLogging.CreateEntry "importing to root certificate store: """ & sCertDirPath, LogTypeInfo
120
- 'iRetVal = oUtility.RunWithHeartbeat("certutil.exe –f -addstore -enterprise -user root """ & sCertDirPath)
120
+ sSettingsPath = "C:\Users\default\AppData\Local\Litronic\OCM"
121
+ oUtility.VerifyPathExists sSettingsPath
122
+ oUtility.VerifyPathExists (oEnv("LocalAppData") & "\Litronic\OCM")
123
+ oFSO.CopyFile (oUtility.ScriptDir & "\Configs\middleware.settings"), (sSettingsPath & "\middleware.settings"), True
124
+ oFSO.CopyFile (oUtility.ScriptDir & "\Configs\middleware.settings"), (oEnv("LocalAppData") & "\Litronic\OCM\middleware.settings"), True
125
+
126
+ iRetVal = oUtility.RunWithHeartbeat("msiexec /i """ & sCertRootInstallerPath & """ /qn /norestart")
127
+ DeleteFile "C:\Users\Public\Desktop","InstallRoot SIPR 5.2.lnk"
128
+
129
+ 'Import Root Certs
130
+ Dim objFolder, objFile
131
+ Set objFolder = oFSO.GetFolder(sCertDirPath & "\" & UCase(sPrefix) & "\Root")
132
+
133
+ for each objFile in objFolder.Files
134
+ if UCase(oFSO.GetExtensionName(objFile.name)) = "CER" Then
135
+ oLogging.CreateEntry "importing to root certificate store: """ & sCertDirPath & "\" & UCase(sPrefix) & "\Root\" & objFile.Name & "", LogTypeInfo
136
+ 'iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Certs\certmgr.exe"" -add """ & sCertDirPath & "\" & UCase(sPrefix) & "\Root\" & objFile.Name & " -c -s -r localMachine Root")
137
+ iRetVal = oUtility.RunWithHeartbeat("certutil.exe -f -addstore -enterprise -user root """ & sCertDirPath & "\" & UCase(sPrefix) & "\Root\" & objFile.Name & """")
138
+ end if
121
139
122
- 'oLogging.CreateEntry "importing to intermediate store: """ & sCertDirPath & "\" & objFile.Name & "", LogTypeInfo
123
- 'iRetVal = oUtility.RunWithHeartbeat("certutil.exe –f –addstore CA """ & oUtility.ScriptDir & "\Configs\90m_CodeSigning_Cert.cer"" -c -s -r localMachine TrustedPublisher")
140
+ WScript.Sleep 1000
141
+ Next
142
+
143
+ 'Import Sub Certs
144
+ Set objFolder = oFSO.GetFolder(sCertDirPath & "\" & UCase(sPrefix) & "\Sub")
145
+
146
+ for each objFile in objFolder.Files
147
+ if UCase(oFSO.GetExtensionName(objFile.name)) = "CER" Then
148
+ oLogging.CreateEntry "importing to root certificate store: """ & sCertDirPath & "\" & UCase(sPrefix) & "\Sub\" & objFile.Name & "", LogTypeInfo
149
+ 'iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Certs\certmgr.exe"" -add """ & sCertDirPath & "\" & UCase(sPrefix) & "\Sub\" & objFile.Name & " -c -s -r localMachine CA")
150
+ iRetVal = oUtility.RunWithHeartbeat("certutil.exe -f -addstore CA """ & sCertDirPath & "\" & UCase(sPrefix) & "\Sub\" & objFile.Name & """")
151
+ end if
124
152
125
- If oEnvironment.Item("IsVM") = "False" Then
126
- oLogging.CreateEntry "Installing drivers for the OMNIKEY3x2x Reader on " & sArch & " systems", LogTypeInfo
127
- iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Configs\HID_OMNIKEY3x2x_" & sArch & "_W7_R1_2_24_27.exe"" /noreboot /S /v/qn")
153
+ WScript.Sleep 1000
154
+ Next
155
+
156
+ 'Import 90 Meter signing Certs
157
+ iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Certs\certmgr.exe"" -add """ & sCertDirPath & "\90m_CodeSigning_Cert.cer"" -c -s -r localMachine TrustedPublisher")
158
+ 'iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Certs\certmgr.exe"" -add """ & sCertDirPath & "\DigiSub.cer"" -c -s -r localMachine Root")
159
+ 'iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Certs\certmgr.exe"" -add """ & sCertDirPath & "\DigiRoot.cer"" -c -s -r localMachine Root")
160
+ 'iRetVal = oUtility.RunWithHeartbeat("certutil.exe -f –addstore TrustedPublisher """ & sCertDirPath & "\90m_CodeSigning_Cert.cer")
161
+ iRetVal = oUtility.RunWithHeartbeat("certutil.exe -f -addstore -enterprise -user root """ & sCertDirPath & "\DigiRoot.cer""")
162
+ iRetVal = oUtility.RunWithHeartbeat("certutil.exe -f -addstore -enterprise -user root """ & sCertDirPath & "\DigiSub.cer""")
163
+
164
+ 'If oEnvironment.Item("IsVM") = "False" Then
165
+ oLogging.CreateEntry "Installing drivers for the OMNIKEY3x2x Reader on " & sArch & " systems", LogTypeInfo
166
+ iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Configs\HID_OMNIKEY3x2x_" & sArch & "_W7_R1_2_24_27.exe"" /noreboot /S /v/qn")
167
+
168
+ oLogging.CreateEntry "Installing drivers for the SCR3xx Reader on " & sArch & " systems", LogTypeInfo
169
+ iRetVal = oUtility.RunWithHeartbeat("""" & oUtility.ScriptDir & "\Configs\SCR3xx_Driver_V4.67\dpinst.exe"" /LM /SA /SW /S")
170
+ 'End If
128
171
129
- oLogging.CreateEntry "Installing drivers for the SCR3xx Reader on " & sArch & " systems", LogTypeInfo
130
- iRetVal = oUtility.RunWithHeartbeat(" """ & oUtility.ScriptDir & "\Configs\SCR3xx_Driver_V4.67\dpinst.exe"" /LM /SA /SW /S")
131
- End If
132
- End If
172
+ sRegCmd = "cmd.exe /c " & oEnv("SystemRoot") & "\regedit.exe"
173
+ sRegCmd = sRegCmd & " /s """ & oUtility.ScriptDir & "\Configs\AFR_Settings.reg"""
174
+ 'oShell.Run(sRegCmd, 0, true)
175
+ oUtility.RunWithConsoleLogging sRegCmd
133
176
177
+ oFSO.CopyFile (oUtility.ScriptDir & "\Configs\ADMX\90meter CACPIVMD DoD Policies.admx"), ("C:\Windows\PolicyDefinitions\90meter CACPIVMD DoD Policies.admx"), True
178
+ oFSO.CopyFile (oUtility.ScriptDir & "\Configs\ADMX\90meter CACPIVMD Policies.admx"), ("C:\Windows\PolicyDefinitions\90meter CACPIVMD Policies.admx"), True
179
+ oFSO.CopyFile (oUtility.ScriptDir & "\Configs\ADMX\en-US\90meter CACPIVMD DoD Policies.adml"), ("C:\Windows\PolicyDefinitions\en-US\90meter CACPIVMD DoD Policies.adml"), True
180
+ oFSO.CopyFile (oUtility.ScriptDir & "\Configs\ADMX\en-US\90meter CACPIVMD Policies.adml"), ("C:\Windows\PolicyDefinitions\en-US\90meter CACPIVMD Policies.adml"), True
181
+ oLogging.CreateEntry "Policy Configurations files were copied to ""C:\Windows\PolicyDefinitions"" folder", LogTypeInfo
182
+
134
183
oLogging.CreateEntry "Finished " & sInstallName & " installation", LogTypeInfo
135
184
Else
136
185
ZTIProcess = Failure
@@ -142,6 +191,21 @@ Function ZTIProcess()
142
191
143
192
End Function
144
193
194
+ Function DeleteFile(sPath, sName)
195
+
196
+ On error resume next
197
+ Dim strFullPath
198
+ strFullPath = sPath & "\" & sName
199
+ If oFSO.fileexists(strFullPath) Then
200
+ oLogging.CreateEntry "File Found: " & strFullPath, LogTypeInfo
201
+ oFSO.DeleteFile strFullPath,0
202
+ oLogging.CreateEntry "File Deleted: " & strFullPath, LogTypeInfo
203
+ Else
204
+ oLogging.CreateEntry "File Not Found: " & strFullPath & ", skipping", LogTypeInfo
205
+ End If
206
+
207
+ End Function
208
+
145
209
</script >
146
210
</job >
147
211
0 commit comments