简体   繁体   English

如何使用自定义许可证验证在VS2010中创建msi安装程序

[英]how to create msi installer in VS2010 with custom licence validation

I have 2 functions: getLicence() which returns licencekey as string and validateLicence() which returns true if validation successful.I have following requirements 我有2个函数: getLicence()返回licencekey作为字符串和validateLicence()如果验证成功则返回true。我有以下要求

  • I want to create msi installer in VS 2010 which calls that getLicence() and shows the licencekey . 我想在VS 2010中创建msi安装程序,它调用getLicence()并显示licencekey

  • and at the same time it will ask to enter licencekey and call the validateLicence() if validation successful,it will installed else not installed showing message "Invalid Licence key"; 同时它会要求输入licencekey并调用validateLicence()如果验证成功,它将安装其他未安装的显示消息“Invalid License key”;

getLicenceKey() uses AesCryptoServiceProvider to encrypt the machinename and generate the licencekey and validateLicence() takes the licence key entered by the user and decrypt and validate. getLicenceKey()使用AesCryptoServiceProvider加密机器名并生成licencekeyvalidateLicence()获取用户输入的许可证密钥并解密和验证。

I am using C# (WCF) I am able to create a MSI installer but I don't know how to call these two functions by the installer (so that user having licencekey can install my application only on one machine). 我正在使用C#(WCF)我能够创建一个MSI安装程序,但我不知道如何通过安装程序调用这两个函数(因此具有licencekey的用户只能在一台机器上安装我的应用程序)。

听起来你会想要查看自定义操作 - http://msdn.microsoft.com/en-us/library/9cdb5eda.aspx

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

相关问题 如何通过自定义卸载操作获取安装目录(由MSI安装,由VS2010创建)? - How to get the installation directory (installed with MSI, created with VS2010) at a custom uninstall action? 如何在VS2010 Windows Installer中取消和回滚自定义操作? - How do I cancel and rollback a custom action in VS2010 Windows Installer? VS2010如何在安装程序中打包DB文件 - How VS2010 packs DB files in installer VS2010 Building Installer安装失败 - VS2010 Building Installer Failing on Setup 如何在VS2010中创建自定义的Debugger Visualizer,以可视化不可序列化的类? - How to create a custom Debugger Visualizer in VS2010 to visualize a class which is non-Serializable? 如何使用VS2010注册表编辑器创建针对64位操作系统的自定义注册表项“Programmable” - How to create custom registry key 'Programmable' targeted on 64bit OS with VS2010 registry editor 如何以编程方式创建MSI安装程序? - How to create an MSI installer programmatically? VS2010构建脚本以将DLL打包到MSI并在GAC中注册 - VS2010 build scripts to package DLLs into an MSI & register in the GAC 如何实现VS2010的自定义图项目? - How to implement custom diagram Project for VS2010? 如何在VS2010中创建与.NET2兼容的应用程序? - How to create .NET2 compatible app in VS2010?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM