Skip to content

Instantly share code, notes, and snippets.

@thenger
Last active August 3, 2021 18:36
Show Gist options
  • Save thenger/e5c5cd2f3aa412567401f03fd2166c51 to your computer and use it in GitHub Desktop.
Save thenger/e5c5cd2f3aa412567401f03fd2166c51 to your computer and use it in GitHub Desktop.
On windows 10 when you want directly a login screen without blur

Windows 10 no lock screen and no blur on login screen

No lock screen (pre login screen):

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization\NoLockScreen DWORD=1

New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -PropertyType DWord -Value 1
Get-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen

Unblur:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\DisableAcrylicBackgroundOnLogon DWORD=1

New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\System -Name DisableAcrylicBackgroundOnLogon -PropertyType DWord -Value 1
Get-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\System -Name DisableAcrylicBackgroundOnLogon

Don't sleep!

https://stackoverflow.com/a/39978595/2282427

1200000 1000 * 60 * 20

When using alim (AC)

powercfg.exe /SETACVALUEINDEX SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 1200

When on battery (DC)

powercfg.exe /SETDCVALUEINDEX SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 1200

gwmi win32_operatingsystem | select caption, version
#caption                  version
#-------                  -------
#Microsoft Windows 10 Pro 10.0.17134
powercfg.exe /L
    Existing Power Schemes (* Active)
    -----------------------------------
    Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced) *
    Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance)
    Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a  (Power saver)
(powercfg.exe /QUERY ((powercfg.exe /GETACTIVESCHEME) -replace '.* ([0-9a-f-]{36}) .*', '$1'))|select-string -Pattern "^  GUID Alias"
      GUID Alias: SCHEME_BALANCED

Change Desktop image ?

Get-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value "C:\Users\etienne.cristin\Pictures\birb_pattern.png"
# Update for current session:
rundll32.exe user32.dll, UpdatePerUserSystemParameters

Change lockscreen image ?

DOESNT WORK:

Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization' -Name LockScreenImage
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization' -Name LockScreenImage -value "C:\Users\etienne.cristin\Pictures\birb_pattern.png"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment