InstallShield添加自定义操作以检查防病毒

时间:2023-02-01 22:39:57

I am a bit of a beginner at InstallShield (in the sense that this is the first time I've used it!).

我是InstallShield的初学者(从某种意义上说,这是我第一次使用它!)。

I have some code that I am packaging up in a .net DLL to check for the existence of anti-virus. The installer I am attempting to create must check for anti-virus (by calling a custom action using my DLL?) and cancel the install if none has been found.

我有一些代码,我将其打包在.net DLL中以检查是否存在防病毒。我试图创建的安装程序必须检查防病毒(通过使用我的DLL调用自定义操作?)并取消安装(如果没有找到)。

The way I seen it working, was the user would see a dialog that is informational ("about to check for anti-virus"), the user would press "Next" it would call the custom action and then show a success screen with a "Next" button, or a failure screen with "Finish" button.

我看到它工作的方式是,用户会看到一个信息性的对话框(“即将检查防病毒”),用户将按“下一步”它将调用自定义操作然后显示成功屏幕“下一步”按钮,或带有“完成”按钮的故障屏幕。

Is this sort of thing possible with InstallShield? Are there any good tutorials out there for doing this sort of thing?

InstallShield可以做到这一点吗?做这种事情有什么好的教程吗?

1 个解决方案

#1


3  

Do you really need a custom action? Do you have more detailed requirements with regards to what products and versions you are looking for?

你真的需要自定义动作吗?您对所需的产品和版本有更详细的要求吗?

InstallShield / Windows Installer has a built in search pattern that can look for registry entries, files, et al.

InstallShield / Windows Installer具有内置搜索模式,可以查找注册表项,文件等。

If you really do need a custom action, how long do you expect the execution to take? If it's only a couple seconds, just schedule it to run after AppSearch. You don't need a UI to say "now doing blah" just do it.

如果您确实需要自定义操作,您希望执行多长时间?如果它只有几秒钟,只需安排它在AppSearch之后运行。你不需要一个用户界面来说“现在正在做”等等。

Since you want to do this in .NET, you need to look at Windows Installer XML (WiX) Deployment Tools Foundation (DTF). You can use this to author/compile custom action DLL's that InstallShield can then consume. Generally the custom action should do it's search and then set a property based on it's result. Then use that property in evaluating whatever business rule you are trying to implement.

由于您希望在.NET中执行此操作,因此需要查看Windows Installer XML(WiX)部署工具基础(DTF)。您可以使用它来编写/编译InstallShield随后可以使用的自定义操作DLL。通常,自定义操作应该进行搜索,然后根据结果设置属性。然后使用该属性评估您尝试实施的任何业务规则。

#1


3  

Do you really need a custom action? Do you have more detailed requirements with regards to what products and versions you are looking for?

你真的需要自定义动作吗?您对所需的产品和版本有更详细的要求吗?

InstallShield / Windows Installer has a built in search pattern that can look for registry entries, files, et al.

InstallShield / Windows Installer具有内置搜索模式,可以查找注册表项,文件等。

If you really do need a custom action, how long do you expect the execution to take? If it's only a couple seconds, just schedule it to run after AppSearch. You don't need a UI to say "now doing blah" just do it.

如果您确实需要自定义操作,您希望执行多长时间?如果它只有几秒钟,只需安排它在AppSearch之后运行。你不需要一个用户界面来说“现在正在做”等等。

Since you want to do this in .NET, you need to look at Windows Installer XML (WiX) Deployment Tools Foundation (DTF). You can use this to author/compile custom action DLL's that InstallShield can then consume. Generally the custom action should do it's search and then set a property based on it's result. Then use that property in evaluating whatever business rule you are trying to implement.

由于您希望在.NET中执行此操作,因此需要查看Windows Installer XML(WiX)部署工具基础(DTF)。您可以使用它来编写/编译InstallShield随后可以使用的自定义操作DLL。通常,自定义操作应该进行搜索,然后根据结果设置属性。然后使用该属性评估您尝试实施的任何业务规则。