Navigation Menu

Skip to content

Commit

Permalink
Fixes for sysprep issue
Browse files Browse the repository at this point in the history
  • Loading branch information
arwidmark committed Nov 6, 2017
1 parent 7225bb8 commit 7496673
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Scripts/Config-DisableWindowsStoreUpdates.wsf
Expand Up @@ -6,10 +6,11 @@
sSystemDrive = oEnvironment.Item("OSDISK")
oLogging.CreateEntry "Current OS drive letter is " & sSystemDrive, LogTypeInfo

oLogging.CreateEntry "About to configure Windows Store Update Settings", LogTypeInfo
UpdateWindowsStoreSettings(sSystemDrive)
oLogging.CreateEntry "About to configure offline registry settings", LogTypeInfo
oLogging.CreateEntry "Windows version applied to harddrive is" & oEnvironment.Item("IMAGEBUILD"), LogTypeInfo
UpdateOfflineRegistry(sSystemDrive)

Function UpdateWindowsStoreSettings(sSystemDrive)
Function UpdateOfflineRegistry(sSystemDrive)

oLogging.CreateEntry "Unload the offline registry file", LogTypeInfo

Expand All @@ -30,15 +31,21 @@
EXIT FUNCTION
End If

oLogging.CreateEntry "Setting the AutoDownload registry value", LogTypeInfo
oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Microsoft\Windows\CurrentVersion\WindowsStore\AutoDownload", "2", "REG_DWORD"
oLogging.CreateEntry "Disable Windows Store Updates", LogTypeInfo
oShell.RegWrite "HKEY_LOCAL_MACHINE\NewOS\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate\AutoDownload", "2", "REG_DWORD"
' 2 = always off
' 4 = always on

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 "Unload the offline registry file", LogTypeInfo
oShell.Run "reg unload HKLM\NewOS", 0, true

UpdateWindowsStoreSettings = Success
UpdateOfflineRegistry = Success

End Function

Expand Down

0 comments on commit 7496673

Please sign in to comment.