Version 7 (modified by mickem, 3 years ago) (diff)

--

Example of a .cmd-script

*This is unsupported user provided content, if you have issues you are on your own :) *


SERVER\SHARE$ is where you keep the script, RoboCopy? and the NSClient++ files

@echo off
echo map drive
net use I:
SERVER\SHARE$\NSClient++ /persistent:no
I:
echo.
echo Install NSClient++
if not exist "C:\Program Files\NSClient++\NSClient++.exe" goto skip01
echo removing old version
"C:\Program Files\NSClient++\NSClient++.exe" /stop
"C:\Program Files\NSClient++\NSClient++.exe" /uninstall
rmdir /s /q "C:\Program Files\NSClient++

:skip01
echo.
echo install latest version
mkdir "C:\Program Files\NSClient++
I:\robocopy /MIR I: "C:\Program Files\NSClient++"
"C:\Program Files\NSClient++\NSClient++.exe" /install
"C:\Program Files\NSClient++\NSClient++.exe" /start
c:
echo.
echo Unmap drive
net use I: /DELETE