简体   繁体   English

setup.exe 的自动安装

[英]Autoinstallaion of setup.exe

I am using visual studio 2008 and I have created setup project using the same.我正在使用 Visual Studio 2008,并使用它创建了安装项目。 After deployment of the application whenever I change any of the file or even rename any file setup.exe automatically starts to reinstall the setup.部署应用程序后,每当我更改任何文件甚至重命名任何文件 setup.exe 都会自动开始重新安装设置。 In this case it should customized error.在这种情况下,它应该自定义错误。

Do anybody has idea on this??有人对此有想法吗?

This is the normal behavior.这是正常行为。 Windows Installer automatically performs a repair if it determines that some of the installed resources are missing. Windows 如果安装程序确定某些已安装资源丢失,它会自动执行修复。

This repair is triggered by:此修复由以下原因触发:

  • launching the application through an advertised shortcut通过广告快捷方式启动应用程序
  • launching a file associated with your application启动与您的应用程序关联的文件

To avoid it you should:为避免这种情况,您应该:

  • make sure that your application doesn't delete, move or rename installed files;确保您的应用程序不会删除、移动或重命名已安装的文件; if you need to work with files use the Application Data folder如果您需要处理文件,请使用 Application Data 文件夹

or或者

  • make sure that the deleted file is not the key member in its component;确保删除的文件不是其组件中的关键成员; this is controlled through the Component table这是通过组件表控制的

To answer your actual question, you cannot show a customized error.要回答您的实际问题,您不能显示自定义错误。 You can only try to avoid this behavior.你只能尽量避免这种行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM