Forked from stevenharman/jenkins-service-with-interactive.ps1
Created
April 27, 2014 17:37
-
-
Save tonidy/11351176 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
# stolen from: | |
# http://lostechies.com/keithdahlby/2011/08/13/allowing-a-windows-service-to-interact-with-desktop-without-localsystem/ | |
# | |
# NOTE: Be sure to run as Admin and restart to take effect. | |
$svcName = Get-Service -DisplayName *jenkins* | 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