从命令行输入NSIS自定义页面

时间:2017-03-13 13:53:35

标签: arguments install nsis silent

我使用nsis为我的程序编写了一个安装程序。 它应该安装在多台机器上,所以我试图从命令行执行它,但我有一个包含文本框的自定义页面。

该页面只有一个文本框:

  

要安装的服务数量

我试图执行它:

C:\install.exe /S 8 C:\MyDir\   (Second paramter is the INSDIR for the next page)

但它不起作用。

任何想法都会有所帮助。

1 个答案:

答案 0 :(得分:0)

{1}}参数保留用于静默安装(不确定是否可以覆盖)。要提供constexpr作为参数,您可以使用保留参数class Abstract { virtual void NotImplemented() = 0; }; int main() { // error C2259 : 'Abstract' : cannot instantiate abstract class // note: due to following members : // note: 'void Abstract::NotImplemented(void)' : is abstract // note: see declaration of 'Abstract::NotImplemented' Abstract* a = new Abstract(); return 0; } (请参阅examples)。

由于您还没有提供您当前正在使用的代码,因此以下是解析命令行参数的一般示例:

/S

服务数量存储在全局变量$INSTDIR中,您可以在nsDialogs(或InstallOptions)页面上使用它。

相关问题