Inno Setup - "New Folder" 自动添加到选定的目标文件夹
Inno Setup - "New Folder" is automatically added to a selected destination folder
我想install/extract将所有文件放入我从安装向导中选择的文件夹中。但是我没有得到它,因为总是创建一个子目录。
例如,如果我选择:C:\MyFolder
,安装程序会自动为其添加New Folder
。
如何在没有任何自动创建的子目录的情况下进行安装?
我的代码:
[Setup]
DefaultDirName={sd}\
DisableDirPage=no
这里有一个例子:
我选择目录:C:\Users\Administrator\Desktop\Neuer Ordner3
但是它选择目录:
C:\Users\Administrator\Desktop\Neuer Ordner3\New Folder
我不想使用 New folder
,只是使用所选的 123
文件夹。
默认情况下,如果您选择另一个目标路径,Inno Setup 会尝试保留路径的最后一个组成部分。
所以如果默认路径(DefaultDirName
)像C:\Program Files\My Program
并且你选择D:\Programs
,它会自动附加My Program
成为D:\Programs\My Program
.
在您的情况下,Inno Setup 因缺少任何子文件夹的默认路径而感到困惑。它(不是很正确)而是附加 New folder
。您确定要安装到 C:\
根目录吗?
无论如何,如果这是有意的,请将 AppendDefaultDirName
设置为 no
。
见documentation on the AppendDefaultDirName
directive:
By default, when a folder in the dialog displayed by the Browse... button on the Select Destination Location wizard page is clicked, Setup automatically appends the last component of DefaultDirName
onto the new path. For example, if DefaultDirName
is {pf}\My Program
and "Z:\" is clicked, the new path will become "Z:\My Program".
Setting this directive to no
disables the aforementioned behavior. In addition, it causes a Make New Folder button to appear on the dialog.
我想install/extract将所有文件放入我从安装向导中选择的文件夹中。但是我没有得到它,因为总是创建一个子目录。
例如,如果我选择:C:\MyFolder
,安装程序会自动为其添加New Folder
。
如何在没有任何自动创建的子目录的情况下进行安装?
我的代码:
[Setup]
DefaultDirName={sd}\
DisableDirPage=no
这里有一个例子:
我选择目录:C:\Users\Administrator\Desktop\Neuer Ordner3
但是它选择目录:
C:\Users\Administrator\Desktop\Neuer Ordner3\New Folder
我不想使用 New folder
,只是使用所选的 123
文件夹。
默认情况下,如果您选择另一个目标路径,Inno Setup 会尝试保留路径的最后一个组成部分。
所以如果默认路径(DefaultDirName
)像C:\Program Files\My Program
并且你选择D:\Programs
,它会自动附加My Program
成为D:\Programs\My Program
.
在您的情况下,Inno Setup 因缺少任何子文件夹的默认路径而感到困惑。它(不是很正确)而是附加 New folder
。您确定要安装到 C:\
根目录吗?
无论如何,如果这是有意的,请将 AppendDefaultDirName
设置为 no
。
见documentation on the AppendDefaultDirName
directive:
By default, when a folder in the dialog displayed by the Browse... button on the Select Destination Location wizard page is clicked, Setup automatically appends the last component of
DefaultDirName
onto the new path. For example, ifDefaultDirName
is{pf}\My Program
and "Z:\" is clicked, the new path will become "Z:\My Program".Setting this directive to
no
disables the aforementioned behavior. In addition, it causes a Make New Folder button to appear on the dialog.