安装程序不要求创建新目录?

发布于 2024-07-15 11:39:31 字数 187 浏览 4 评论 0原文

(抱歉,不完全是一个编码问题)

假设我想将某些内容安装到目录 C:\pony 但文件夹“pony”不存在,我怎样才能让 InstallShield 通知用户文件夹“pony”不存在并询问用户是否要创建该目录。

现在发生的事情是目录自动创建。

这只是我正在使用的安装盾(2008 Express)的限制吗?

(sorry, not exactly a coding question)

Say I want to install something to the directory C:\pony but the folder 'pony' does not exist, how can I get InstallShield to inform the user that the folder 'pony' does not exist and ask the user if he or she wants to create the directory.

What happens now is the directory is automatically created.

Is this simply a limitation of the install shield I'm using (2008 Express)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

初见 2024-07-22 11:39:31

一些 InstallScript 代码可以做到这一点:

if (ExistsDir(szPath) == NOTEXISTS) then
    if (AskYesNo("The directory does not exist. Would you like Setup to create it?", YES) == NO) then
        abort;
    else
        CreateDir(szPath);
    endif;
endif;

Some InstallScript code would do it:

if (ExistsDir(szPath) == NOTEXISTS) then
    if (AskYesNo("The directory does not exist. Would you like Setup to create it?", YES) == NO) then
        abort;
    else
        CreateDir(szPath);
    endif;
endif;
过度放纵 2024-07-22 11:39:31

我不知道有什么内置方法可以做到这一点。 您可能需要编写一些自定义代码(InstallScript 或 MSI 自定义操作,具体取决于您使用的项目类型)来检查目录是否存在并提示用户。

I don't know of a built-in way to do this. You may need to write some custom code (either InstallScript or MSI custom action, depending on what kind of project you are using) to check whether the directory exists and prompt the user.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文