Epsilon
Posts: 25
Joined: Wed Dec 27, 2006 1:09 am
Location: New Zealand
Contact: Website

Application Folder

I have created an installer that does not register the product with Windows Installer and I also want to install it into a specific Application Folder (D:\Data\[ProductName]). I don't want to give the user the option to change this. The 'D:\Data' folder will always exist on the target PC. I also want to always overwrite any files that are already there with the same name.

This is so that I can distribute a test version of the application using an AI package but without officially registering it with Windows (due to security restrictions on the user's PC).

What I find is that the application is always installed into the 'All Users\Application Data' folder unless I select 'Limit to basic user interface', then my specified folder is used however, the installation doesn't overwrite any files already there. All files have the option 'Ensure that this ifle overwrites any installed target file' set.

Is this a bug in AI or am I stuck with this behaviour?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Application Folder

Hello,

Simply remove the FolderDlg dialog so that the user does not have the possibility to change the installation path. Regarding the installer overwriting an existing file, I could not reproduce the behavior. The attached sample project overwrites the already existing file. Simply replace the broken.txt file with one of your own. The package installs to E:\xyz as configured from the install parameters page.
The broken.txt file has the "ensure that this file overwrites any installed target file" option enabled, and behaves accordingly.

Best regards,
Gabriel
Attachments
sample.aip
(7.31 KiB) Downloaded 493 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Epsilon
Posts: 25
Joined: Wed Dec 27, 2006 1:09 am
Location: New Zealand
Contact: Website

Re: Application Folder

Hi Gabriel

Thanks for your response - on further investigation the overwrite option does seem to work. I think the problem that I was having was in sending the new installer to my client (who is in a different part of the country and I am emailing him the program). I will have to investigate further.

Regarding the 'FolderDlg' - I have already tried this and it makes no difference - in fact, this is where I started. I don't want the user to see or be able to change the target folder. However, if I do this the target folder is always the standard 'All Users\Application Data" folder rather then the specific folder I specify. The only way I can force the install into D:\Data\[ProductName] is to remove the user interface as indicated in my original post. I would like them to see the user interface so that they clearly see the installation proceeding.

When I try to use your Sample.aip I get an error saying I must have the Enterprise edition of AI - my licence is for the Professional version so I'm not sure what to do about this.

I have tried changing the Installation Type option (I have it set to Per User) but again this makes no difference.

Do you have any other suggestions?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Application Folder

Hello,

Please send your .aip project file to support at advancedinstaller dot com and refer to this thread inside your email.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Application Folder

Hello,

On the custom actions page, you have a Property Set with Formatted custom action in which you are setting APPDIR to [CommonAppDataFolder]\[ProductName]. I believe this is the cause of your issue.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Epsilon
Posts: 25
Joined: Wed Dec 27, 2006 1:09 am
Location: New Zealand
Contact: Website

Re: Application Folder

Thanks for pointing that out - removing that Custom Action has fixed the issue for my Test application installs.

I now remember putting that in to my MS Access database application installs a few years ago because of problems with Vista and the virtualisation of the 'Program Files' folder.

I had forgotten about this but it all makes sense now!

Thanks again for your prompt reply.

Return to “Common Problems”