A lot of Windows NES servers must be upgraded. How to upgrade them silently using a script ?
Release Automation - All Versions
NES on Windows
Silent upgrade of Windows NES server could be made using command line like :
nolio_server_windows-x64_<version>.exe -q -console -varfile server.upgrade.silent.varfile
File server.upgrade.silent.varfile could be found in RA root directory.
Add this line in file server.upgrade.silent.varfile :
sys.confirmedUpdateInstallation$Boolean=true
See the documentation for more information : Upgrade Nolio Release Automation
Here is an example of script to do a silent upgrade of a NES server with in version 6.9.0
@echo off
echo.
echo 1- Find Nolio Path from services NolioServer20 in Registry
FOR /F "tokens=1* delims=/" %%i IN ('%windir%\system32eg.exe query "HKLM\System\CurrentControlSet\Services\NolioServer20" /v "ImagePath" 2^>NUL') DO SET RA_HOME=%%i
FOR /F "tokens=2*" %%i IN ('echo %RA_HOME%') DO SET RA_HOME=%%j
FOR /F "tokens=1 delims=" %%i IN ('echo %RA_HOME%') DO SET RA_HOME=%%~dpi
SET RA_HOME=%RA_HOME:"=%
SET RA_HOME=%RA_HOME%..\
echo Nolio Path = %RA_HOME%
echo.
echo 2- Copy file server.silent.varfile into server.upgrade.silent.varfile
copy "%RA_HOME%"\server.silent.varfile server.upgrade.silent.varfile
IF ERRORLEVEL 1 (
echo Could not copy the file %RA_HOME%\server.silent.varfile
goto end
)
echo sys.confirmedUpdateInstallation$Boolean=true>> server.upgrade.silent.varfile
echo.
echo 3- Start Upgrade to 6.9
START /WAIT nolio_server_windows-x64_6_9_0_b1268.exe -q -console -varfile server.upgrade.silent.varfile
echo exit code %ERRORLEVEL%
:end
upgrade the NES could be done using this method :
1- Copy the files nolio_server_windows-x64_6_9_0_b1268.exe and upgrade.bat (containing script above) in a temp directory on the server
Ex:
2- Execute these commands with Administrative privileges :
cd /D c:\temp\RA 6.9
upgrade.bat
Example of output :