Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run Jenkins slaves as a windows service, which will then launch a chain of calling (for example):

Slave.exe->ant->cmd batch->notepad.exe

The problem is that "notepad.exe" is not visible, I can see it in task manager, but it doesn't show its UI.

The windows platform is win server 2008, and I have configured the service "Log on as the Local System Account", with "Allow service to interact with desktop" checked.

Any ideas about this? Thanks a lot

share|improve this question
add comment

2 Answers

As of Windows Vista, all services run in a separate session (session 0) and cannot normally interact directly with the user, even if "Allow service to interact with desktop" is set. In other words, you aren't supposed to do that. Can't you run slave.exe within your logon session?

However, as a backwards compatibility mitigation measure, Windows is supposed to detect that a service has presented a user interface and offer to display it to you (on a separate desktop). I'm not sure why this wouldn't be working. Is the service configured to run as Local System?

share|improve this answer
    
Thanks a lot for the response. Yes I configure the service as "Use Local System user". So I cannot use "windows service" way to start Jenkins slave, right? That's a pity cause it's very convinient... –  Michael Lin Apr 24 '12 at 8:28
add comment

I ran in to a similar issue trying to kick off some automated scripts web testing scripts (that needed a GUI).

This is the trick. You need to start up remote desktop connection, set it up to kick off an .exe once the connection starts, enter and save a authentication information, and save the connection to disk.

Have jenkins kick off the saved RDP connection and it should initiate a GUI for you.

Also if you are running multiple windows commands in jenkins you need to have each command as separate items (if they return an exit code.. like if you are calling two .bat files or something)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.