有没有办法运行 [Code]
在生成安装可执行文件之前,Inno Setup 编译器中的程序或 PowerShell 脚本?
最佳答案
如果您解释运行代码的目的,您可能会得到更好的答案。反正...
一种方法是compile the script on command-line从批处理文件:
powershell -file precompile.ps1
ISCC.exe setup.iss
powershell -file postcompile.ps1
(或者您可以从 PowerShell 脚本本身调用
ISCC.exe
)在编译之前运行一些脚本的另一种方法是使用
Exec
preprocessor function .#expr Exec("precompile.bat")
或者
#expr Exec("powershell -file precompile.ps1")
另见 Is it possible to call a batch file while compiling an Inno Setup script?
如果您需要 GUI 解决方案,请访问 ISTool ,一个 Inno Setup 扩展,它直接支持预编译和编译后“步骤”。但不幸的是,该项目已不再维护。您可以将其更新到最新的 Inno Setup 版本,因为它是开源的。
关于powershell - 在 Inno Setup 编译器中运行 [Code] 或 PowerShell 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48772183/