Page 1 of 1
is there a way to run a program with a UI, then end it?
Posted: Mon Mar 16, 2009 3:08 pm
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?
i added some code to do this and that seems easiet
Posted: Mon Mar 16, 2009 3:38 pm
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.
Posted: Mon Mar 16, 2009 4:27 pm
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.
The 'Run Hidden' option doesn't seem to work
Posted: Mon Mar 16, 2009 4:41 pm
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.
Posted: Tue Mar 17, 2009 9:32 am
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.