Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

93 lines (73 sloc) 3.87 KB
<job id="Config-Win10-Offline-UE.wsf">
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript">
oLogging.CreateEntry "Getting crrent OS drive letter", LogTypeInfo
sSystemDrive = oEnvironment.Item("OSDISK")
oLogging.CreateEntry "Current OS drive letter is " & sSystemDrive, LogTypeInfo
oLogging.CreateEntry "About to configure offline registry settings", LogTypeInfo
oLogging.CreateEntry "Windows version applied to harddrive is" & oEnvironment.Item("IMAGEBUILD"), LogTypeInfo
UpdateOfflineRegistry(sSystemDrive)
Function UpdateOfflineRegistry(sSystemDrive)
oLogging.CreateEntry "Unload the offline registry file", LogTypeInfo
bFound = False
For each sDir in oFSO.GetFolder(sSystemDrive & "\").Subfolders
If oFSO.FileExists(sDir & "\system32\config\software") then
oLogging.CreateEntry "Trying to load registry file " & sDir & "\system32\config\software", LogTypeInfo
iRetVal = oUtility.RunWithHeartbeat("reg load HKLM\NewOS """ & sDir & "\system32\config\software""")
If iRetVal = SUCCESS then
bFound = True
exit for
End if
End If
Next
If not bFound then
oLogging.CreateEntry "Unable to find the new OS HKLM:\SOFTWARE registry file; Reg settings cannot be updated.", LogTypeError
UpdateDevicePath = Success
EXIT FUNCTION
End If
oLogging.CreateEntry "Disable edge shortcut creation on desktop", LogTypeInfo
oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Microsoft\Windows\CurrentVersion\Explorer\DisableEdgeDesktopShortcutCreation", "1", "REG_DWORD"
' 1 = Off (disabled)
' 0 = On (enabled)
oLogging.CreateEntry "Disable edge First run", LogTypeInfo
oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\MicrosoftEdge\Main\PreventFirstRunPage", "1", "REG_DWORD"
' 1 = Off (disabled)
' 0 = On (enabled)
oLogging.CreateEntry "Disable edge pre-loading", LogTypeInfo
oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\MicrosoftEdge\Main\AllowPrelaunch", "0", "REG_DWORD"
' 0 = Off (disabled)
' 1 = On (enabled)
oLogging.CreateEntry "Disable edge TAB pre-loading", LogTypeInfo
oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\MicrosoftEdge\TabPreloader\AllowTabPreloading", "0", "REG_DWORD"
' 0 = Off (disabled)
' 1 = On (enabled)
'oLogging.CreateEntry "Enable dont display switch user", LogTypeInfo
'oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Microsoft\Windows\CurrentVersion\Policies\System\HideFastUserSwitching", "1", "REG_DWORD"
' 1 = Off (disabled)
' 0 = On (enabled)
'oLogging.CreateEntry "Disable Consumer Experience", LogTypeInfo
'oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\Windows\CloudContent\DisableWindowsConsumerFeatures", "1", "REG_DWORD"
' 1 = Off (disabled)
' 0 = On (enabled)
'oLogging.CreateEntry "Disable last username display on logon screen", LogTypeInfo
'oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Microsoft\Windows\CurrentVersion\Policies\System\dontdisplaylastusername", "1", "REG_DWORD"
' 1 = Off (disabled)
' 0 = On (enabled)
'oLogging.CreateEntry "Disable Defender", LogTypeInfo
'oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\Windows Defender\DisableAntiSpyware", "1", "REG_DWORD"
' 1 = Off (disabled)
' 0 = On (enabled)
'oLogging.CreateEntry "Disable OneDrive", LogTypeInfo
'oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\Windows\OneDrive\DisableFileSyncNGSC", "1", "REG_DWORD"
' 1 = Off (disabled)
' 0 = On (enabled)
'oLogging.CreateEntry "Disable Cortana", LogTypeInfo
'oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Policies\Microsoft\Windows\Windows Search\AllowCortana", "0", "REG_DWORD"
' 0 = Off (disabled)
' 1 = On (enabled)
oLogging.CreateEntry "Unload the offline registry file", LogTypeInfo
oShell.Run "reg unload HKLM\NewOS", 0, true
UpdateOfflineRegistry = Success
End Function
</script>
</job>
You can’t perform that action at this time.