简体   繁体   English

如何在Visual Studio安装项目中使用自定义窗体来自定义安装向导

[英]How to customize the Setup wizard with custom forms in Visual Studio setup project

I have to create a setup project with custom serial key validation. 我必须使用自定义串行密钥验证来创建安装项目。 I have to proceed the installation only after the serial key is authenticated or else we have to skip the installation. 只有在对串行密钥进行身份验证之后,我才必须继续安装,否则我们将跳过安装。

I have tried the sample setup project, and have called the custom form for authenticating serial key in the installer class, merged the installer class from the custom action in the setup project. 我已经尝试了示例安装程序项目,并在安装程序类中调用了用于验证串行密钥的自定义表格,并合并了安装程序项目中的自定义操作中的安装程序类。

But the Serial key validation form comes after the progress form executes. 但是,串行密钥验证表单是在进度表单执行后出现的。

I need to show it after the welcome page. 我需要在欢迎页面之后显示它。

I have attached the screenshot of the setup wizard. 我已附上设置向导的屏幕截图。

在此处输入图片说明

How to bring the Setp 5 form (custom form) before Step 2? 如何在步骤2之前携带Setp 5表单(自定义表单)?

This can't be done in Visual Studio setups - the only validation supplied is the serial number template, a masked edit control to verify the basics. 在Visual Studio安装程序中无法做到这一点-提供的唯一验证是序列号模板,即用于验证基础知识的带掩码的编辑控件。 This is because Visual Studio setups custom actions all run after the files are installed, and you cannot associate one with a button click to validate the serial number, or in fact anything in the UI. 这是因为Visual Studio设置自定义操作都在文件安装后运行,并且您不能将一个按钮与单击按钮相关联以验证序列号或实际上UI中的任何内容。

You might need to use another tool for your setup. 您可能需要使用其他工具进行设置。 VS setups are pretty simple but they don't have many features. VS设置非常简单,但是没有很多功能。 Otherwise you could use another tool to build a merge module that you could add. 否则,您可以使用其他工具来构建可以添加的合并模块。 Manually editing the MSI file is a possibility but you'd need to know a lot about the internals of MSI files. 可以手动编辑MSI文件,但是您需要了解MSI文件的内部知识。

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

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