Jump to content

Windows app exit problem


JerryH
 Share

Recommended Posts

A testing app I wrote involves a PS1 script that gets some information from our Team Foundation server, then launches a custom browser app, and finally an AU3 script that works with the site the browser has navigated to. (I use a simple custom browser instead of IE or another browser, because it's borderless, and unaffected by themes that may be applied to one machine and not another.)

When the AU3 script returns to the PS1 script, the latter does a little checking to be sure things went okay, then outputs some messages and closes. The browser application uses the IE-based control, and when the AU3 script is finished with it, it closes the browser by sending it an {ESC}. That causes the main window to Close(), ending the app.

If I run the browser alone, there's no drama at all. It navigates to the URL on its command line, I browse with it, and press the <ESC> key to close it. However, when it is run from my AU3 script, most times I get the message from Windows telling me that my app has quit responding, and would I like to close it, report it, etc.. D'uh! Of course it's not responding. I closed it.

This test (a build verification test, or "smoke test") is being run manually for now, by clicking a desktop shortcut to launch the PS1 script. We simply dismiss the error dialog when everything has finished. But in the future, I want to automate this on an admin machine, so that it's automatically started when a build has completed. Running it unattended, I can't have it generating useless errors after each test.

Has anyone seen this happen when your scripts have closed a managed app? Got any ideas I can try to make it stop?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...