AU3 script started BY a service

Recommended Posts

JerryH 0

JerryH 0

A WCF service running in a Windows service host launches a PowerShell script which in turn launches a compiled AU3 script (after setting up an environment for it to work with). Then the AU3 process comes to a stop.

The PowerShell script and the AU3 script work just fine if run by a logged-on user. It's when they're launched by a service that they go to sleep.

I've read the FAQ article about launching an AU3 script AS a service, but in this case I just need the script to work when launched BY a service. I'm hoping this isn't a rare problem, and someone here has an idea what I should try next.

Share this post

Link to post

Share on other sites

JerryH 0

JerryH 0

Question: Why are you jumping all through these hoops to run a AU3 script?

Edit: What I'm getting at is a compiled Au3 script is an exe. Soooo, just get Powershell to kick it off. Am I missing something here?

Yeah, I left out a lot of details that I didn't think would be relevant. When the build quality reported by VSTF indicates that our nightly build has completed, a WCF Listener object takes note of that, and checks to see whether it should be doing something based on that change in quality. A rule tells it that it should launch a Build Verification Test on a remote server, so it triggers the WCF Executor service on that remote machine and tells it what job to start.

After clearing out a workspace, fetching some files from source control, and some other preparation, the Executor service launches the PowerShell script written to handle that task. The PowerShell script does a bit more preparation, launches a special borderless browser (essentially an IE web control), navigates to a test site, and then launches the AU3 script.

The AU3 script runs through a series of steps to exercise our web application, and when it's finished, it returns control to the PowerShell script, which does a SQL query to find out if everything is as it should be. If successful, the build quality value is changed to indicate that we're ready for the next step.

Launched from a desktop shortcut, all this works flawlessly. But when the PowerShell script is launched by our Executor service, it gets as far as launching the special browser and the AU3 script, then everything comes to a stop.

I was hoping that someone could either tell me what I need to do to make it work, or confirm that it's never gonna work, and I'll quit spending time on it.

Thanks!

Share this post

Link to post

Share on other sites

Bert 1,223

Bert 1,223

Ok....I will say it again, for what you described makes no difference. You can run it from a shortcut. Well, that points to a EXE file. Use Powershell to start it. Now, this sounds like a Powershell problem. It won't start the exe. That is where you should look.