How can I lunch my app after install?
Hello,
I would like to know how can I lunch my app after installation?
Please advise.
Archive: How can I lunch my app after install?
How can I lunch my app after install?
Hello,
I would like to know how can I lunch my app after installation?
Please advise.
Please advise.read the manual "MUI_FINISHPAGE_RUN exe_file" :-)
I can't find anything about MUI_FINISHPAGE_RUN exe_file!
Look in your NSIS installation directory under /docs/modern UI for the file "readme.html"
But I don't use the modern interface?
Use Exec "$INSTDIR\My Program.exe" at the end of your section.
for classic UI you have to set up a custom page name it additional tasks or something similar and prompt users e.g. to create quick launch shortcut, launch application when installation is finished, launch help file, visit website etc.
According to the info collected on that page, create custom functions to do the requested action, e.g if the user has selected launch application, then .onInstSuccess exec $INSTDIR\myapp.exe and so on.
k thanks, Exec "$INSTDIR\My Program.exe" has worked on installation to lunch the app... How can I close the program to uninstall it in case it's running?!
Generally it's not good idea launching an app without prompt users if they want this action.
As for close a prog, either use FindWindow/SendMessage or use the system plugin Call (see system plugin documentation/examples) to perform this action.
Also there is a plugin at wiki named find proccess that could do this job.
I guess I have to use SendMessage since my app runs on the background.
But How can I do that?
Thanks.
if the app that you wish to terminate is running on backround, obviously it has not a window, therefore you must find it by proccess, either with system plugin or with find proccess plugin.
In every case, the best way for you to learn, is to read the nsis manual , perform forum search for specified actions, and get experience with included in NSIS installation directory examples, as well with wiki articles and examples.
My app runs each 15 minutes for 20 secondes, so it has a window, but it's invisible most of the time.
Kill the app if it is still running before new installation
KillProcDLL::KillProc "MYAPP.EXE"
But better use a sendmessage
Even better if you wrote the application yourself handle a QUIT parameter e.g. if it is ruinning make sure the renewed params are handeled.
ShellExec MYAPP.EXE /Q
even better... search the forum first ;)
Or use Takhir's FCT plugin which is much safer than using KillProcDLL.
-Stu
Thanks guys. Can you give me the syntax of SendMessage?