Created
March 18, 2015 20:53
-
-
Save ijprest/faf7be1b8ec7c5cf5156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[int]$Delay = 0 | |
) | |
$Win32 = Add-Type -Name WinAPICall -Namespace SystemParametersInfo -PassThru -MemberDefinition @' | |
[DllImport("user32.dll", EntryPoint = "SystemParametersInfo")] | |
public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, uint pvParam, uint fWinIni); | |
'@ | |
if($Win32::SystemParametersInfo(0x17,$delay,$null,0)) { | |
Write-Host "Keyboard delay changed to: $delay" | |
} else { | |
Write-Host "There was an error while changing the keyboard delay." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment