Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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."
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement