We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

open a special file after finish installing application

Hi all.
I want to open a special file after finish installaing my app. I use a check box, if check box was ticked and press finish button, the file will be opened.
For example, If the installation error, the error fatal dialogue display, I remove log check box and replace it by my custom check box. When we check this box and press finish, my custom .txt file will be opened.
Please help me.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: open a special file after finish installing application

Hello,

Please take a look on the Launch file after installation article with related information for hints and guidance.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: open a special file after finish installing application

Thanks for your reply, Dan.
But I still have a question. If it is not exit dialogue, such as, Fatal error dialogue, and I want to launch a .txt file when the installation is error.
Example, I don't want to use Log Check Box to open log file, I deleted the log check box in Fatal Error Dialogue then created new check box and use it to launch a .txt file. This .txt file was created by myself, not by msiexec.exe. Can I do it?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: open a special file after finish installing application

Hello,

In order to achieve that you can add the predefined Launch file custom action without sequence from the Custom Actions page.

Then, in the Dialogs page, you can add this custom action to be executed as a published events on the Finish button from the FatalError dialog. Here's an article with related information for hints and guidance: How do I execute a custom action when a button is pushed?. You can condition the execution of this custom action depending the checkbox control state.

Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: open a special file after finish installing application

I'm sorry for my limited knowledge. If the special .txt file was put on desktop, what string must be type at "File to launch" feild. It is "%userprofile%\desktop\log.txt" or "#%userprofile%\desktop\log.txt" or what? Thanks :)
Attachments
Capture.PNG
Capture.PNG (44.65 KiB) Viewed 5990 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: open a special file after finish installing application

Hello,

Since you are using a reference to an environment variable (e.g. USERPROFILE) you should use something like that:

Code: Select all

"[%USERPROFILE]\Desktop\log.txt"
You can take a look on the Windows Installer Formatted Type article which may be useful to you.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
congnt92
Posts: 57
Joined: Wed Apr 16, 2014 7:53 am

Re: open a special file after finish installing application

Thank you very much, Dan. God bless u :)
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: open a special file after finish installing application

You're welcome,

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”