Created
August 13, 2011 16:16
-
-
Save dahlbyk/1143996 to your computer and use it in GitHub Desktop.
Set "Allow Interact with Desktop" for Windows Service
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
$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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment