is there a way to run a program with a UI, then end it?

Got a problem you cannot solve? Try here.
Post Reply
dunion
Posts: 106
Joined: Tue Oct 14, 2008 10:43 am

is there a way to run a program with a UI, then end it?

Post by dunion »

I have a UI program that I can do the registration during runtime - but it may take a while to run (may try to talk to a lot of hardware) - so I want to 'hide it' from windows and the user... but then I want to end it, also - normally there would be some user interaction to end the program but I'd like to automate all of that during the install.

I saw the 'run' and 'hide from windows' but not a 'stop' option.

Is there such a think in InstallAware?
dunion
Posts: 106
Joined: Tue Oct 14, 2008 10:43 am

i added some code to do this and that seems easiet

Post by dunion »

using a command line param that I can pass during the install I use the program itself to do the registration, then exit; this work so far. More more testing on various OS's and versions will follow :) .

I'm currently counting on the fact that the install executable will have the elevated rights to make this work on Vista - or can be 'run as admin' at least.

Thanks.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Yeah, that's not a bad idea - when setup elevates its child processes are also elevated unless you run them with the de-elevate switch in Run Program As - very desirable on NT6.0+ with UAC enabled when you want to launch the program you just installed in invoker context so document files don't go missing, etc.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
dunion
Posts: 106
Joined: Tue Oct 14, 2008 10:43 am

The 'Run Hidden' option doesn't seem to work

Post by dunion »

I used 'run as' and 'hidden window' option and the window associated with the program still shows up. I could in theory also fix that in my code, but is there some other setting needed to run my program without the UI showing up from the install project settings?

- I have 'requires elevation' (this allow the program to run with enough permissions to do the registraion).
- The program reads the install param and runs in 'registration mode', which registers and exits. Right now the UI shows up briefly then exits.

If this feature doesn't work I can try to change my code around to not show the UI if it gets this parameter as a work-around.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

InstallAware passes the SW_HIDE parameter to your main application window, so you may want to check your application and determine why the UI is still showing; or alternately, pass a custom command line parameter to your application with which you know to manually hide everything.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply