简体   繁体   English

使用 nssm 和 Inno Setup 脚本安装元数据库

[英]Install metabase using nssm and Inno Setup script

I want to open an administrative CMD window using Inno Setup and want to install:我想使用 Inno Setup 打开一个管理 CMD 窗口并想安装:

nssm install metabase

I tried the following function, but it doesn't work.我尝试了以下功能,但它不起作用。

Exec(ExpandConstant('{cmd}'), ' nssm install', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);

Please someone help me.请有人帮助我。 Thank you in advance.先感谢您。

You are effectively executing:您正在有效地执行:

cmd nssm install

That wouldn't work anywhere, not only in Inno Setup.这在任何地方都行不通,不仅在 Inno Setup 中。 It should be:它应该是:

cmd /c nssm install

Though, it's an overkill to run nssm via cmd .尽管如此,通过cmd运行nssm是一种矫枉过正。 Run it directly:直接运行:

nssm install

In Inno Setup Pascal Script:在 Inno Setup Pascal 脚本中:

Exec('nssm', 'install', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM