/
ZTIDefaultAssociations.wsf
51 lines (50 loc) · 2.68 KB
/
ZTIDefaultAssociations.wsf
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
<job id="ZTIDefaultAssociations">
<script language="VBScript" src="../../Scripts/ZTIUtility.vbs"/>
<script language="VBScript">
' // ***************************************************************************
' //
' // Copyright (c) Microsoft Corporation. All rights reserved.
' //
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File: ZTIDefaultAssociations.wsf
' //
' // Version: 6.3.8443.1000
' //
' // Purpose: Use Dism to force apply start screen layout.
' //
' // Usage: cscript ZTIDefaultAssociations.wsf [/debug:true] [/UDI]
' //
' // ***************************************************************************
Option Explicit
RunNewInstance
'//----------------------------------------------------------------------------
'// Main Class
'//----------------------------------------------------------------------------
Class ZTIDefaultAssociations
'//----------------------------------------------------------------------------
'// Main routine
'//----------------------------------------------------------------------------
Function Main
'//----------------------------------------------------------------------------
'// Declare variables
'//----------------------------------------------------------------------------
Dim iRetVal
iRetVal = Success
'//----------------------------------------------------------------------------
'// Copying OEMDefaultAssociations.xml file
'//----------------------------------------------------------------------------
oLogging.CreateEntry "Copying OEMDefaultAssociations.xml to Windows\System32.", LogTypeInfo
oFileHandling.CopyFile oUtility.ScriptDir & "\OEMDefaultAssociations.xml", oEnv("WinDir") & "\System32\OEMDefaultAssociations.xml", true
oFileHandling.CopyFile oUtility.ScriptDir & "\fz-a2_specsheet.pdf", oEnv("SystemDrive") & "\Users\Public\Desktop\fz-a2_specsheet.pdf", true
oFileHandling.CopyFile oUtility.ScriptDir & "\fz-q2_specsheet.pdf", oEnv("SystemDrive") & "\Users\Public\Desktop\fz-q2_specsheet.pdf", true
oFileHandling.CopyFile oUtility.ScriptDir & "\Toughbook.url", oEnv("SystemDrive") & "\Users\Public\Desktop\Toughbook.url", true
'//----------------------------------------------------------------------------
'// Specify to use OEMDefaultAssociations via Registry
'//----------------------------------------------------------------------------
oLogging.CreateEntry "Import DefaultAssociationsConfiguration Reg Key.", LogTypeInfo
iRetVal = oUtility.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\DefaultAssociationsConfiguration", oEnv("WinDir") & "\System32\OEMDefaultAssociations.xml")
End Function
End Class
</script>
</job>