我们使用Visual Studio 2013在vb.net中开发了一个软件。现在,我们要构建具有以下步骤/功能的自定义安装程序:
这几乎类似于Adobe或Corel的注册过程。
我们对其他技术也持开放态度,这些技术也必须确保我们的软件只能安装在一台计算机上。
请注意,我们是一群新手程序员(不是那么高级)。如果详细说明该过程,将对我们非常有帮助。
最佳答案
One-Shot Setups: "
A setup is run once, an application can be started again - in order to resolve and debug problems interactively - with meaningful error messages show to the user.
"Hence:
avoid license validation in the setup
.
Short version on licensing。
License Key: Preferring to deal with license keys in your application seems logical for several reasons:
the one-shot nature of setups
yieldspoor reliability
(no interactive debugging - poor ability to resolve problems). The end result islots of support calls
for something very trivial.Further, the
risk of piracy and hacking
is a major concern when exposing a license validation DLL in the setup. And finallycommunication over the Internet
is difficult with today's setups (proxies
,firewalls
,etc...
) - which is a modern way to validate license keys (in the future setups might have full Internet access, but be careful assuming too much since corporate users may have lots of restrictions and poor deployment could hurt sales and acceptance of the software for corporate use).Finally your application must usually support a
trial version
, and then you need alicense dialog in your application
anyway. Why complicate your setup too?CAs: Custom actions are complex and vulnerable to failure in general - due to complex
sequencing-
,conditioning-
andimpersonation issues
and overallpoor debugability
. More information: Why is it a good idea to limit the use of custom actions in my WiX / MSI setups?
Overall Complexity of Deployment: A short, attempted summary of the overall complexity of deployment: Windows Installer and the creation of WiX (section
"The Complexity of Deployment"
).
我将从设置中删除所有许可功能,并将它们添加到应用程序中。您的安装程序仍可以通过将许可证作为传递给 msiexec.exe 到磁盘或注册表中,来写入许可证-
大写属性(或者您可以通过使用转换来应用串行属性来“隐藏”更多内容-它与在命令行上设置属性的效果完全相同)。 交互式运行时,您也可以从安装程序对话框中设置LICENSE属性,但是我最喜欢的方法是允许在静默部署模式下将未经验证的许可证密钥添加到注册表中,而是直接在交互式部署的应用程序而不是安装程序(上面的描述是静默部署的):
msiexec.exe /I "C:\Install.msi" /QN /L*V "C:\msilog.log" LICENSE="123-456-789"
有许多更具体的原因可以防止许可证处理和验证不符合您的设置:
关于vb.net - Windows应用程序的在线注册安装程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24359248/