FolderName of APPDIR - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Rudolf
Posts: 2
Joined: Mon Jun 28, 2010 1:58 pm

FolderName of APPDIR

Hi,

I have an APPDIR that by default looks as follows:

[C:\Program Files\MyCompany\MyApp\runtime\

The user can however change the path of the installation directory to, for example

C:\Program Files\MyCompany\MyApp\anotherfolder\

Is there any way of getting the value "runtime" or "anotherfolder" , i.e. the folder name of the selected APPDIR?

I need to use this folder name in the installer to write files to a specific LocalAppData path that uses the value of the APPDIR folder name in the full path name, e.g.

C:\Users\adm_rb\AppData\Local\TigerLogic\runtime\
or
C:\Users\adm_rb\AppData\Local\TigerLogic\anotherfolder\



Regards

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

Re: FolderName of APPDIR

Hi Rudolf and welcome to Advanced Installer Forums,

First, I highly recommend you read our tutorials for a better understanding of how to use Advanced Installer to efficiently deploy your products.
This will also help you better understand my suggestion.

Regarding your issue, I am afraid Windows Installer does not directly support this. You can create your own custom action to extract that string from APPDIR.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Rudolf
Posts: 2
Joined: Mon Jun 28, 2010 1:58 pm

Re: FolderName of APPDIR

Hi Gabriel,

That's fine. I tought this would not be directly possible.

The workaround I found is to add a manual folder to the "Application Folder" in the "Files and Folders" section, e.g.

"Target Computer"/"Application Folder"\olt\osrt

Now any APPDIR directory the user selects will be appended with the folder name "olt\osrt", e.g.

APPDIR = C:\Program Files (x86)\Online Travel Services AG\
Effective Installation Directory: C:\Program Files (x86)\Online Travel Services AG\olt\osrt

and I now know the installation folder name will always be "osrt".

Regards

Rudolf

Return to “Common Problems”