Hi, I've created a skin for an application not written by me. I'm using Inno Setup to install the skin.
The user has to specify in the installer where the application is installed, for example "C:\Program Files\Database Printer\".
I'm using the code below for the default directory name. The problem is that when the user has installed the application in a non-standard directory and has to select the folder manually with the "Browse" button, then the directory name is always added to the path.
If the user selects "F:\My Applications\Database Printer", then the path becomes "F:\My Applications\Database Printer\Database Printer" and they won't be able to install the skin. Unfortunately most users don't understand they simply have to remove the last "Database Printer" from the path.
Is there a way to prevent the folder name from automatically being added when the user selects the folder manually?
Code:DefaultDirName={code:GetAppFolder}\Database Printer function GetAppFolder(Param: String): String; begin if InstallOnThisVersion('0,6', '0,0') = irInstall then Result := 'C:\Users\Public\' + ExpandConstant('{username}') else Result := ExpandConstant('{pf}'); end;


Reply With Quote