ginkgo
Posts: 7
Joined: Thu Jul 15, 2010 5:17 am

Copy & Move Files not in Application Folder

Hi,
We are using Advanced Installer Pro for the first time to install the new version of our software. Creating the installer for new users is a snap. To create the installer for existing users is a bit more of challenge. The one we are working on now is copy and move files.

The User Guide gives File Copy/Move instructions. In attempting to implement this, it is not clear if it is possible to copy and move files that are not contained within the Application Folder. We want to copy and move files from a folder parallel to the Application Folder? Is this possible with Advanced Installer Pro?

For most users, this would most likely be in the Program Files folder. A few might have installed our earlier version in My Documents. Is it possible to to set a relative path? ie the two folders, version 1 and the new version 2 in the Application folder will be in the same parent folder?

Thank you in advance for your assistance,
Patricia
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Copy & Move Files not in Application Folder

Hello Patricia,

The File Copy/Move operation can copy files from folders Windows Installer knows about. You can create a property-based folder and set it's path to the path from which you want to copy your files (i.e the path to the folder under Program Files or under My Documents). You can then create a copy/move operation that uses this property-based folder as the source path.

Let me know if this worked for you.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ginkgo
Posts: 7
Joined: Thu Jul 15, 2010 5:17 am

Re: Copy & Move Files not in Application Folder

Thank you Gabriel. Your answer makes sense and while we haven't fully implemented this yet, to expand my original question:

Is it possible for the Folder we add to put a variable in the Properties, to indicate that this folder is right beside the Application folder? Or must we specify specifically Program Files or My Documents

Thank you,
Patricia
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Copy & Move Files not in Application Folder

Hello,

It's recommended you actually search where your application was installed. Perhaps you store that path in the registry in which case you can retrieve it from there. Then manipulate that path using a custom action to obtain the path required for your property-based folder.

For example:
- you have your application installed at 'c:\program files\yourapp'
- a property holds the above path, let's assume the property's name is MYFOLDERPATH
- a custom action would eliminate the 'yourapp' part from the path and replace it with 'somefoldername', then store it in MYFOLDERPATH
- the folder would then install to that path

If you know for sure your application is always installed inside program files, you can use a Property Set with Formatted custom action to set MYFOLDERPATH to [ProgramFilesFolder]. Place this custom action right after Begin standard action in the InstallUISequence then hold Shift and drag it under the Begin standard action in InstallExecuteSequence.

Same suggestion applies for the My Documents location, except you use [PersonalFolder] instead of [ProgramFilesFolder].

Tip:
The following page describes all properties containing paths to known locations in Windows:
http://www.advancedinstaller.com/user-g ... paths.html

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”