在安装程序类中更改TARGETDIR [英] Changing TARGETDIR in Installer Class

查看:76
本文介绍了在安装程序类中更改TARGETDIR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



在安装程序类中更改[TARGETDIR] ...

Hi Friends,

Changing [TARGETDIR] in Installer Class...

推荐答案

你除非你有充分的理由这样做,否则不应该这样做。在安装过程中错误的时间更改TARGETDIR可能会破坏您的应用程序安装并使其无法卸载。



您必须记住以下几点这样做。您不能仅仅假设您的安装程序将被用于执行安装。还有管理员安装,维护(修复)安装和卸载。更改TARGETDIR以进行安装并不一定意味着在安装过程中用于更改TARGETDIR的相同方法将在安装程序的其他用途中执行。



阅读这个 [ ^ ]。



如果你真的打算这样做,请不要使用Visual Studio中的安装项目。使用专业的安装包构建器项目,如InstallShield。



哦!另一件事。您还必须考虑在64位计算机上安装/维护/卸载您的应用程序的可能性,其中Program Files文件夹可以具有不同的名称,具体取决于安装程序/应用程序的位数。
You shouldn''t be doing that unless you have a damn good reason to do so. Changing the TARGETDIR at the wrong time during an installation can break your app installation AND make it impossible to uninstall.

You have to keep more than a few things in mind when doing this. You can''t just assume your installer wil ever be used to do just an install. There are also Admin installations, Maintenance (Repair) installs, and Uninstalls. Changing the TARGETDIR for an Install doesn''t necessarily mean that the same method you use for changing the TARGETDIR during install is going to get executed during the other uses for your installer.

Read this[^].

If you really are going to process to do this, DO NOT DO IT using the Setup project in Visual Studio. Use a professional installation package builder project, like InstallShield.

Oh! And another thing. You also have to consider the possibility that your app is being installed/maintained/uninstalled on a 64-bit machine where the Program Files folder can have a different name depending on the bitness of your installer/app.

这篇关于在安装程序类中更改TARGETDIR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆