Hello Akshay,
I have done some further research and it looks like the Control Panel accepts special characters such as the pipe character.
However, a Windows document does not. Therefore, what we need to do here is the following:
- remove the
ProductName property from the
Application Folder path. This path is defined in the
"Install Parameters" page:

- IP.png (32.45 KiB) Viewed 6134 times
- after doing so, we will need to create a custom action that modifies the value of the ProductName (e.g. to replace the pipe character "|" with a space character " ") and then rebuilds the APPDIR property accordingly (without the pipe character so it does not give an error)
As you can see, the default path looks somethine like this:
Code: Select all
[ProgramFilesFolder][Manufacturer]\[ProductName]
where:
- [Manufacturer] =
"Product Details" page -->
"Publisher" field
- [ProductName] =
"Product Details" page -->
"Name" field
For instance, a script (PowerShell) that will do what I've mentioned above can look as it follows:
Code: Select all
$progFilesFolder = AI_GetMsiProperty ProgramFilesFolder
$manufacturer = AI_GetMsiProperty Manufacturer
$prodName = AI_GetMsiProperty ProductName
if ($prodName.Contains('|') -eq "True"){
$prodName = $prodName.Replace('|',' ')
}
AI_SetMsiProperty APPDIR "$progFilesFolder$manufacturer\$prodName"
To implement this in Advanced Installer, please go to
"Custom Actions" page and add a
"PowerShellScriptInline" custom action
without sequence.
After doing so, please go to
"Dialogs" page --> select
"FolderDlg" -->
"Init Events" tab and add your custom action there as an
"Init Event":
Event: Execute a custom action
Argument: <your_custom_action>
Condition: leave unchanged

- CADialogs.png (136.36 KiB) Viewed 6134 times
Hope this helps.
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging