tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Folder with Capital Letters

Good morning,
under Files and Folder I've created a new Folder PROPERTY Based. This Property has the default value set to "C:\". Using a VBS procedure called in the first Welcome Dialog, this property is set to the correct path, like "C:\Data\other_software\".
Inside this folder, I have some folders named with Capital Letter ("STD"):
PROPERTY_FOLDER\
.....|--- STD\
............|--- Folder1\
............|--- Folder2\
............|--- CAPITAL_FOLDER3\
AI Files and Folders
AI Files and Folders
filesfolder.png (22.9 KiB) Viewed 5821 times
To check the path of PROPERTY_FOLDER, I run with Log and I check the correct value of the property: it is set correctly from "C:\" to "C:\Data\other_software\".

At installation finish, I check folders and this is the result:
C:\
...|--- STD\
............|--- CAPITAL_FOLDER3\
...|--- Data\other_software\
.....................|--- STD\
.............................|--- Folder1\
.............................|--- Folder2\

Completely wrong!!!
Seems that Capital Folders are treated as PROPERTY and AI use the default value. This happens with ALL subfolder of PROPERTY_FOLDER which have CAPITAL letters as name.
Result after installation finish
Result after installation finish
result.png (94.18 KiB) Viewed 5821 times
So I have tried to rename all folders from CAPITAL to lower-case and the result is that folders are installed all correctly in the right path!

Is mandatory to use only lower-case letters in names of folders?

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

Re: Folder with Capital Letters

Hello,

Attached is a project I used to try and reproduce the issue you are describing. The issue did not manifest itself. Both "new" and "ABCD" subfolders installed under the correct path.

Perhaps I am not testing this correctly in which case please modify the attached project so that it can manifest the issue you are reporting, then post it on this thread.

Best regards,
Gabriel
Attachments
test.aip
(7.54 KiB) Downloaded 457 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Re: Folder with Capital Letters

I've attached you my project and the Custom Action VBS used.

Can you check this if I have committed mistakes?

The problem is with variable APPLAN_DATANET and subfolders pointed by the red arrow: if I have these folders as CAPITAL letters, they are installed under "C:/". If they are lower-case, they are installed in the correct path.
prob.png
prob.png (15.47 KiB) Viewed 5805 times
Attachments
problem.zip
(156.77 KiB) Downloaded 366 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Folder with Capital Letters

Hi,

Properties used by property-based folders can be set in two ways:
1. By setting the property before CostInitialize action.
or
2. By using a "Directory set with Formatted" custom action after CostFinalize.

Since you are using an UI custom action, you are setting the property after InstallUISequence -> CostFinalize. The solution is to set a different property inside your custom action and then use a "Directory set with Formatted" action after InstallExecuteSequence -> CostFinalize which sets the actual folder property.
If they are lower-case, they are installed in the correct path.
This is a coincidence based on the way private and public properties work. This behavior is not always the same and cannot be trusted.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Re: Folder with Capital Letters

Perfect!
It works perfectly using "Directory set with Formatted"!

Thank you very much for your help!
tarnic
Posts: 26
Joined: Mon May 18, 2009 10:41 am

Re: Folder with Capital Letters

Hi cosmin,
just another thing.

During installation now all ok.
Does this method create problems during uninstall?

Because now no one file is uninstalled. All files remain installed and not removed!!!
Do you know what the problem can be?

Thank you
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Folder with Capital Letters

Hi,

Please make sure that this custom action runs only during install. It should use this condition:

Code: Select all

Not Installed
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”