From 40055437d9a261cf6b0e217f7dc3bb08114f29a5 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Sat, 22 Aug 2015 18:52:01 +0200 Subject: [PATCH] remove reg-import from optimize lockscreen --- scripts/optimize-lockscreen.ps1 | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/optimize-lockscreen.ps1 b/scripts/optimize-lockscreen.ps1 index 9fef125..65050c5 100644 --- a/scripts/optimize-lockscreen.ps1 +++ b/scripts/optimize-lockscreen.ps1 @@ -2,16 +2,10 @@ # This script disables the new lock screen and login screen background # image. -Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1 - echo "Disabling login screen background image" -Import-Registry(@" -[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System] -"DisableLogonBackgroundImage"=dword:00000001 -"@) +mkdir -Force "HKLM:\Software\Policies\Microsoft\Windows\System" +sp "HKLM:\Software\Policies\Microsoft\Windows\System" "DisableLogonBackgroundImage" 1 echo "Disabling new lock screen" -Import-Registry(@" -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization] -"NoLockScreen"=dword:00000001 -"@) +mkdir -Force "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" +sp "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" "NoLockScreen" 1