public

Set "Allow Interact with Desktop" for Windows Service

  • Download Gist
Enable-AllowInteractWithDesktop
1 2 3 4 5 6
$svcName = Get-Service -DisplayName *cruise* | select -Exp Name
$svcKey = Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\$svcName
 
# Set 9th bit, from http://www.codeproject.com/KB/install/cswindowsservicedesktop.aspx
$newType = $svcKey.GetValue('Type') -bor 0x100
Set-ItemProperty $svcKey.PSPath -Name Type -Value $newType

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.