How to force Inno Setup to set the installation folder dynamically

前端 未结 1 1122
盖世英雄少女心
盖世英雄少女心 2020-12-17 01:44

I am creating an installation package and user should be able to install it on a specific location only.

In order to do so I read some registry values in the

1条回答
  •  有刺的猬
    2020-12-17 02:27

    • Use a scripted constant to set the default installation path;
    • Use the DisableDirPage directive to prevent an user from modifying it.
    [Setup]
    DefaultDirName={code:GetDefaultDirName}
    DisableDirPage=Yes
    
    [Code]
    
    function GetDefaultDirName(Param: string): string;
    begin
      Result := ...;
    end;
    

    0 讨论(0)
提交回复
热议问题