Stop installation after copying files? - Advanced Installer Community
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Stop installation after copying files?

Hello,

How to stop the installation after copying files. During an update the installer needs to copy the new files to the installation folder and then stop the installer without processing anything or removing the files copied. How to do this please?

:?:
K
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Stop installation after copying files?

Hello K,

I'm not sure I fully understand your scenario. Could you give us more details regarding the required behavior?

Do you need to create a package that will upgarde the old one without removing its files? In this case you could try to implement a patch : Creating Patches

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Stop installation after copying files?

Hello,

Is there way to extract the files inside the installer during the Wizard Dialog Stage?
K
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Stop installation after copying files?

Hello K,

Only files added as temporary files in your project are available during Wizard Dialogs Stage. More specifically, they are copied in temp location during Cost Finalize standard actiom of Wizard Dialogs stage.

In order to copy these files in another location you could use a custom action launching a batch file. This batch file could be added as a temporary file as well : How to launch a CMD or BAT file

Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Stop installation after copying files?

Hello,

Thank you. This is a good idea. I have a question, is there a way to close the installer when the Next button is clicked in a custom dialog instead of going to the next dialog? I know I can use the "ErrorMessage" custom action. But this shows an error message. How to close the installer without showing any error message?

I am trying to do this,

1. Extract the files the Temp folder by opening the installer
2. User clicks the Next button in custom dialog
3. This will copy the files to the installation folder using a VBScript custom action
4. Then it needs to close the installer.
K
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Stop installation after copying files?

Hello K,

You are welcome!
I have a question, is there a way to close the installer when the Next button is clicked in a custom dialog instead of going to the next dialog?
Yes, this could be implemented by lanching a custom action that will fail, thus the whole installation will fail (the FatalError dialog will be displayed).

This is the complete method:

- go to "Custom Actions" page and create a new "Execute inline script code" custom action. Configure this custom action with an invalid code thus it will fail (for example an empty line)
- go to "Dialogs" page and select the Next button. Create a new Execute custom action published event for the above custom action
- select FatalError dialog from "Special Dialogs"" section. This dialog is displayed when a custom action fails. You could edit the dialog in order to not specify that there was an error with the installation.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sarahah
Posts: 1
Joined: Wed Oct 25, 2017 9:01 am
Contact: Website

Re: Stop installation after copying files?

How to launch a file after an installation? Any help? :(
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Stop installation after copying files?

Hello Sarahah and welcome to our forums,

Please take a look on our article: How to launch a file after an installation

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Stop installation after copying files?

Sorin wrote:Hello K,

You are welcome!
I have a question, is there a way to close the installer when the Next button is clicked in a custom dialog instead of going to the next dialog?
Yes, this could be implemented by lanching a custom action that will fail, thus the whole installation will fail (the FatalError dialog will be displayed).

This is the complete method:

- go to "Custom Actions" page and create a new "Execute inline script code" custom action. Configure this custom action with an invalid code thus it will fail (for example an empty line)
- go to "Dialogs" page and select the Next button. Create a new Execute custom action published event for the above custom action
- select FatalError dialog from "Special Dialogs"" section. This dialog is displayed when a custom action fails. You could edit the dialog in order to not specify that there was an error with the installation.

Best regards,
Sorin
This works great. But it shows a message that the script is an error before showing the FatalError dialog. How to prevent the error message?
K
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Stop installation after copying files?

Hello K,

Do you use Enhanced User Interface (from "Themes" page, settings). If you do,could you please try to use a "Run PowerShell Inline Script" custom action instead of the "Execute Inline Script Code" one?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Codename K
Posts: 479
Joined: Fri Jan 29, 2010 3:04 pm

Re: Stop installation after copying files?

This is working perfectly. Thank you. :)
Sorin wrote:Do you use Enhanced User Interface (from "Themes" page, settings). If you do,could you please try to use a "Run PowerShell Inline Script" custom action instead of the "Execute Inline Script Code" one?
K
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Stop installation after copying files?

Hello K,

You are welcome! Just let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”