在使用Inno Setup进行设置期间运行安装程序类

时间:2015-06-02 00:55:07

标签: installer inno-setup

我想在设置Windows桌面应用程序期间运行Installer class。安装程序的要点是使用 my Calculator() on Calculator() display dialog "Calculator" buttons {"Add", "Multiply", "Divide"} if button returned of the result is "Add" then display dialog "What plus What?" default answer "" set a to (text returned of result) if a is equal to "q" then return end if display dialog "Next number" default answer "" set b to (text returned of result) set c to a + b display dialog "The answer is " & c buttons {"Start Again", "Quit"} if button returned of the result is "Quit" then return else my Calculator() end if end if if button returned of the result is "Multiply" then display dialog "What times what?" default answer "" set a to (text returned of result) if a is equal to "q" then return end if display dialog "Next number" default answer "" set b to (text returned of result) set c to a * b display dialog "The answer is " & c buttons {"Start Again", "Quit"} if button returned of the result is "Quit" then return else my Calculator() end if end if if button returned of the result is "Divide" then display dialog "What divided by what?" default answer "" set a to (text returned of result) if a is equal to "q" then return end if display dialog "Next number" default answer "" set b to (text returned of result) set c to a / b display dialog "The answer is " & c buttons {"Start Again", "Quit"} if button returned of the result is "Quit" then return else my Calculator() end if end if end Calculator end end 加密应用程序的配置设置(这必须在用户的计算机上进行)。

在旧的vdproj项目中执行自定义操作似乎非常简单,但我们更喜欢使用Inno Setup,因为它工作得非常好并且在我们的构建环境中运行良好。

我在安装过程之后查看了有关运行其他可执行文件等的文档,但没有看到任何涉及在应用程序中运行DataProtectionConfigurationProvider类的内容。

1 个答案:

答案 0 :(得分:1)

您不能直接从InnoSetup调用.NET代码。

构建一个嵌入安装程序的小应用程序,在安装过程中解压缩到临时文件夹并运行它。

或者建立一个.dll并从InnoSetup调用它 见Call C# DLL from Inno Setup with callback