AquaComm
Posts: 45
Joined: Wed May 06, 2020 3:25 am

Create new folder at same level as Application Folder.

Wed Aug 25, 2021 1:41 am

I have created a Property which points to the same setting as the "Application Folder" except I have removed the "[ProductName]" and instead added the desired folder name....

Code: Select all

[AI_ProgramFiles][Manufacturer]\MyCourts\DLLRepository2
I then created the folder in "Files and Folders" using "New Folder -> Property based" as there were no apparent other ways of creating it.

Project builds fine but the following error is now thrown when run:

Code: Select all

Target paths not created. No path exists for entry APPDIR in Directory table.
How do I resolve this?

As a second part of this question...

When I try to delete the new folder in AI, the action fails because it's referred by other items. Search reveals two references but how do I remove those references? One is a Registry type and the other a Component type

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Create new folder at same level as Application Folder.

Wed Aug 25, 2021 11:26 am

Hello,

To achieve this, please follow these steps:

  1. From the “Install Parameters” page, select the “Mixed 32/64-bit matching the platform” package type.
  2. In the “Properties” page, add a new property, for example “MYPROP” and it’s value “C:\”.
  3. Go to the “Files and Folders” page and add a new “Property Based Folder” which points to the “MYPROP” property.
  4. Now from the “Custom Action” page, add a new “Set installer property” custom action with sequence. Move it to the “Wizard Dialogs Stage” after “Paths Resolution” and configure it like in the screenshot:
    CustomActionFolder.png
    CustomActionFolder.png (73.24KiB)Viewed 8208 times
Attached is a sample project configured to do what you need. I also displayed the property on an edit box in the "WelcomeDlg" dialog. As you can see the path is correct.
CustomActionFolder2.png
CustomActionFolder2.png (63.49KiB)Viewed 8208 times

If you still can’t get this working, can you please send us the .AIP (setup project) file by email to support at advancedinstaller dot com so we can review its settings?

Best regards,
Liviu
Attachments
Your Application.aip
(19.13KiB)Downloaded 285 times
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

AquaComm
Posts: 45
Joined: Wed May 06, 2020 3:25 am

Re: Create new folder at same level as Application Folder.

Thu Aug 26, 2021 1:09 am

Hi Liviu,

Thank you for your prompt and comprehensive reply and help. It's very gratefully appreciated.

I followed your instructions and have got it working however only after I changed the name of the property that I created to all capital letters. I am a newbie to AI and appreciate the difference between all caps etc but I am very used to camel case and it's going to be a hard earned lesson 8-)

There was a second part to my original question ..'
When I try to delete the new folder in AI, the action fails because it's referred by other items. Search reveals two references but how do I remove those references? One is a Registry type and the other a Component type
Should I open a new topic?

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Create new folder at same level as Application Folder.

Thu Aug 26, 2021 12:05 pm

Hi,
I am a newbie to AI and appreciate the difference between all caps etc but I am very used to camel case and it's going to be a hard earned lesson
Public properties contain only upper-case letters in their name. The difference between Private and Public Properties consists in the way their values are being passed on. The value of a Public Property is passed on from the Wizard Dialogs Stage (in which the dialogs are showed) to the Install Execution Stage (in which the system is modified).

Here is the Windows Installer Properties article which may be useful to you.
There was a second part to my original question ..'
When I try to delete the new folder in AI, the action fails because it's referred by other items. Search reveals two references but how do I remove those references? One is a Registry type and the other a Component type
Should I open a new topic?
I'm sorry for that. I thought it will be resolved with the first problem.

To remove the folder, please follow these steps:
  1. Click on the "Search" button when prompting "it's referred by other items".
  2. Double click on the item from the search list. For example, double click on the "Registry" result. This will open the page where the folder is referred.
    FolderReferences1.png
    FolderReferences1.png (64.2KiB)Viewed 8186 times
  3. Delete the selected value.
    FolderReferences2.png
    FolderReferences2.png (41.26KiB)Viewed 8186 times
  4. Now you should be able to delete the folder from the "Files and Folder" page even if the result shows references to a component. If you still can not delete it, please repeat the above steps for the second item result.
Hope this helps!

If you still can’t get this working, can you please send us the .AIP (setup project) file by email to support at advancedinstaller dot com and we will gladly assist you.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”