简体   繁体   English

在VS2010中创建项目安装程序-检测丢失的安装程序的先前安装

[英]Creating project installer in VS2010 - detecting previous installations of lost installer

I have a C# project in VS2010 and an installer file for it - but the installer project is lost so I am trying to reproduce it. 我在VS2010中有一个C#项目,并且有一个安装程序文件-但是安装程序项目丢失了,因此我尝试重现它。

On the old installer, it presents the following screen if previously installed. 在旧的安装程序上,如果先前已安装,它将显示以下屏幕。

在此处输入图片说明

How can I make this happen for the new installer as well? 如何使新安装程序也能做到这一点? I have tried to use the same UpgradeCode (found using the advice here , but it still does not appear. Even running the same installer twice doesn't show it so I am guessing there is an option somewhere..? 我试图使用相同的UpgradeCode(使用此处的建议找到 ,但仍然没有出现。即使两次运行相同的安装程序也无法显示该信息,所以我猜测某个地方有一个选项。

The installer is a signed executable (or at least a uniquely-identified executable) so Windows knows when the 'same' one is being re-run and can present the 'repair/remove' dialog. 安装程序是经过签名的可执行文件(或至少一个唯一标识的可执行文件),因此Windows知道何时重新运行“相同”的文件,并可以显示“修复/删除”对话框。

Your new installer, though for the same project, has a different signature - so to Windows, it's completely different to the earlier one and therefore you just get the 'install' dialog. 您的新安装程序(对于同一个项目)具有不同的签名-因此对于Windows,它与早期的安装程序完全不同,因此,您仅显示“安装”对话框。

I'm not an expert on the subject, but in principle you'd have to replicate the signature of the earlier installer in your new one. 我不是该主题的专家,但是原则上您必须在新的安装程序中复制早期安装程序的签名。 I don't know if that's possible, but if it is then your new installer will look like the old one to Windows and you'll get the 'repair/remove' options. 我不知道这是否可行,但是如果是这样的话,那么新的安装程序将看起来像Windows的旧安装程序一样,您将获得“修复/删除”选项。

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

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