Page 1 of 1

Automate NSClient installation on Windows

Posted: Fri Feb 22, 2013 2:49 am
by Mecallie
Hi folks,

I am trying to automate the installation of the NSClient on our machines (Windows).
Installing it manually by double clicking works fine, but if I try the below command line it installs but does not add the allowed hosts parameter.

Code: Select all

M:\>msiexec /i C:\NSCP-0.4.1.90-Win32.msi /quiet /norestart ADDLOCAL="ALL" REMOVE="Documentation"
ALLOWED_HOSTS="10.2.251.10"
When I run the above command without the /quiet part it works as you would think: it disables the documentation by default and does not ask me for the allowed hosts part. However: it does not work. When I install it this way the allowed hosts part of the ini file just says 127.0.0.1 and nothing else.

Can anyone help me get this running (on Windows 7 for now)? Other methods that can be easily deployed centrally via a GPO or simple script are also welcome!

TIA!

Re: Automate NSClient installation on Windows

Posted: Fri Feb 22, 2013 10:24 am
by yancy
Mecallie,

You need to place the quiet switch on the end like this:

Code: Select all

 msiexec /i C:\NSCP-0.4.1.90-Win32.msi /norestart ADDLOCAL="ALL" REMOVE="Documentation" ALLOWED_HOSTS="10.2.251.10" /quiet 
-Yancy

Re: Automate NSClient installation on Windows

Posted: Mon Feb 25, 2013 9:23 am
by Mecallie
Hello Yancy,

Thanks for the reply. I've tried your command line: same issue. Everthing installs fine, except for the allowed hosts in the .ini file.
I think the MSI engine should take my command line as well, but in any case: no difference :(

For the life of me I cannot figure out why this is not working. I would think that if I enter

Code: Select all

msiexec /i C:\NSCP-0.4.1.90-Win32.msi ADDLOCAL="ALL" REMOVE="Documentation" ALLOWED_HOSTS="10.2.251.10"
It would give me the installer with Documentation removed for default and "Allowed hosts" filled with 10.2.251.10 by default. It does the first, but not the second: it does not even ask me for the allowed hosts.

Is there a way maybe to let this install but let it use a registry key instead of an .ini file? That way I can make a group policy to set the reg key to the allowed hosts. Any other way of acomplishing my wish of an auto-roll out with allowed hosts filled in is also very welcome!

Re: Automate NSClient installation on Windows

Posted: Mon Feb 25, 2013 10:18 am
by slansing
You may want to try this with NSClient++ 0.3.9.x rather than the latest 0.4.x version as they differ quite a bit and during the development process some things can get left behind.