sunee225y
Posts: 2
Joined: Tue Aug 08, 2006 10:39 am

How can I control the order of installations?

Hi,

In one of the msi files I created, I am copying a set of files to a user given path and installing a supporting program. Now, I want to reverse the order of the installation.

I would like to install the program first and when this is successful, then only I should go and copy the files. Please do let me know how this can be achieved.

Thanks,
Suneetha
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Custom actions in the commit section are executed when the application is installed, after everything finished OK. So schedule your custom action (that copy your files) under the commit section in the "Custom Actions" page.

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
sunee225y
Posts: 2
Joined: Tue Aug 08, 2006 10:39 am

Hi Gigi,

Thanks for the reply. I have started using the installer only today. I am working on a modification of an .aip file.

There are some of our custom files which are placed in the Files and folders\Application Folder. These files are the ones I have to handle for copying them after the installation of the supporting program.

Please let me know if you need further info in this regards. Will be glad to provide the same.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
There are some of our custom files which are placed in the Files and folders\Application Folder. These files are the ones I have to handle for copying them after the installation of the supporting program.
Please tell me where you need to copy those files after installation and why?

Basically you can do this with a VBS custom action like this:

1. Create a vbs file with this code:

Code: Select all

Set fso = CreateObject("Scripting.FileSystemObject")

strPath = Session.Property("APPDIR")+"*.*"
' copy folder
fso.CopyFile strPath, "D:\MyFolder\", TRUE
2. Switch to "Custom Actions" page and add "New Attached Custom Action" under the "InstallFinalize" standard action (make "InstallFinalize" visible by right clicking on "InstallExecuteSequance" and choose "Show Standard Action->Before Finalization->InstallFinalize").
3. Use following options for the CA:
3.1 Function Name: empty
3.2 Execution Condition: Not Installed

Note that i schedule the CA under the "InstallFinalize" (the CA will be executed at the end of the installation) because under the "Commit" section the "APPDIR" property can not be accessed.

Hope this help.

Regards,
Gigi
_________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Feature Requests”