Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Set "Allow Interact with Desktop" for Windows Service
$svcName = Get-Service -DisplayName *cruise* | select -Exp Name
$svcKey = Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\$svcName
# Set 9th bit, from
$newType = $svcKey.GetValue('Type') -bor 0x100
Set-ItemProperty $svcKey.PSPath -Name Type -Value $newType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment