Skip to content

Instantly share code, notes, and snippets.

@sengiv
sengiv / Disable Lock Screen - Windows 10
Created July 2, 2022 01:58
Steps To Disable Lock Screen - Windows 10 - Tested to be working for all scenarios, sleep, hibernate & restart
Open regedit
1.Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
2.Right click on Windows and select New>Key
3.Name the new key Personalization
4.Right click on Personalization and select New>DWORD (32-Bit) Value
5.Name it NoLockScreen
6.Double click NoLockScreen and edit the value to be 1 (Hexadecimal) and click OK.
7.Restart the computer, and the lock screen should be disabled when it resumes from sleep.
@sengiv
sengiv / InstallChrome.sh
Created May 7, 2021 14:04
Install Latest Chrome with PowerShell
$LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound)