I want to keep the original folder name as it is. So when selecting the location on custom directory page, Inno Setup should keep the default folder name unless manually overwritten by the user. That is, if the default location is c:\MS
, if the user selects d:\
drive, then it must be d:\MS
.
Have tried setting AppendDefaultDirName
to yes
. But still I am not getting the expected result.
[Setup]
DefaultDirName={tmp}\MyProg
AppendDefaultDirName=yes
[Code]
procedure InitializeWizard();
begin
DirPage := CreateInputDirPage(
wpSelectDir, 'Directory Selection', 'Choose where to install.', false, '');
DirPage.Add('Select Custom Location ');
DirPage.Values[0] := GetPreviousData('Directory1', 'C:\MS');
end;