It's actually a standard innosetup installer and support its silent options.QandA wrote:Could you please provide a documentation of how to silently
You can run the installation on a "master" compute using
Code: Select all
<exeInstaller> /saveinf="C:\temp\uvnc-unattended.inf"
Now you can run the installer silently on additional computes, eg. from a cmd script or shortcut:
Code: Select all
<exeInstaller> /verysilent /norestart /sp- /loadinf="C:\temp\uvnc-unattended.inf"
Alternatively you can of course use the MSI installer (note, the MSI installer will be provided later for the latest 1.2.3.x release, it's not yet available). With MSI you can use the default silent options.
Code: Select all
msiexec /i <msi-path.msi> /qn /norestart
Uninstalling MSI is equally easy
Code: Select all
msiexec /x <msi-path.msi> /qn /norestart
If you use the EXE installer you need to actually run the uninstaller from the installation folder silently:
Code: Select all
unins000.exe /verysilent /norestart /sp-
Moreover it's recommended to attempt killing the processes before you try to uninstall. Also try to kill winvnc.exe and uvnckeyboardhelper.exe (Windows 8 only?). Also depending on the OS and screen capturing method your schook.dll/schook64.dll might be locked which will make the uninstall fail. But you can use taskkill to kill all processes which use schook.dll/schook64.dll (actually very often it's injected into explorer.exe).
Well, I did write a script to uninstall UltraVNC pretty reliably, tested with 64-bit version, but should work with 32-bit version too.
Code: Select all
@echo off
:: This ia a very simple uninstaller script which was written to just run an
:: existing uninstaller in silent mode.
:: Source settings.
call "%~dp0var.cmd"
:: Service name
set SERVICE_NAME=uvnc_service
:: Location where VNC is installed
:: set APP_DIR=uvnc bvba\UltraVNC
set APP_DIR=UltraVNC
set INSTALL_TARGET=%ProgramFiles(x86)%\%APP_DIR%
if exist "%ProgramFiles%\%APP_DIR%" set INSTALL_TARGET=%ProgramFiles%\%APP_DIR%
:: Tools.
set TOOLS_TASKKILL=%~dp0taskkill.exe
if exist "%SystemRoot%\system32\taskkill".exe set TOOLS_TASKKILL=%SystemRoot%\system32\taskkill.exe
:: Path where the uninstaller is located
:: set APP_DIR=%APP_DIR%
:: Options to be passed to the uninstaller in order to uninstall silently
set OPTIONS=/verysilent /norestart /sp-
:: Define exit code.
set EXIT_CODE=0
:: Shut down service.
:: echo Stopping service.
:: sc stop "%SERVICE_NAME%" > NUL 2>&1
echo Stopping existing service
net stop "%SERVICE_NAME%" > NUL 2>&1
:: sc stop "%SERVICE_NAME%" > NUL
:: Force stop service.
:: "%~dp0taskkill.exe" /FI "SERVICES eq %SERVICE_NAME%" /F
"%TOOLS_TASKKILL%" /FI "SERVICES eq %SERVICE_NAME%" /F >NUL 2>&1
"%TOOLS_TASKKILL%" /IM "winvnc.exe" /F >NUL 2>&1
"%TOOLS_TASKKILL%" /IM "uvnckeyboardhelper.exe" /F >NUL 2>&1
:: Files which might be listed in Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations and therefore blocking a re-install.
del /f /q "%INSTALL_TARGET%\schook.dll" > NUL 2>&1
del /f /q "%INSTALL_TARGET%\schook64.dll" > NUL 2>&1
del /f /q "%INSTALL_TARGET%\winvnc.exe" > NUL 2>&1
del /f /q "%INSTALL_TARGET%\is-*.exe" > NUL 2>&1
if exist "%INSTALL_TARGET%\schook.dll" "%TOOLS_TASKKILL%" /FI "MODULES eq schook.dll" /F >NUL 2>&1
if exist "%INSTALL_TARGET%\schook64.dll" "%TOOLS_TASKKILL%" /FI "MODULES eq schook64.dll" /F >NUL 2>&1
:: Uninstall legacy path
if "%APP_DIR%" == "UltraVNC" goto skipDefaultUVNC
call :uninstall "UltraVNC"
:skipDefaultUVNC
call :uninstall "%APP_DIR%"
:: ############################################################################
:: No need to change anything below this line (usually ;-))
:: ############################################################################
:uninstall
setlocal
:: Fetch application directory.
set APP_INSTALL_DIR=%~1
echo Removing Application
setlocal enabledelayedexpansion
set EXIT_CODE=0
if not exist "%ProgramFiles(x86)%\%APP_INSTALL_DIR%" goto skip32bit
for /f %%I IN ('dir /O:-N /b "%ProgramFiles(x86)%\%APP_INSTALL_DIR%\unins*.exe"') DO (
if exist "%ProgramFiles(x86)%\%APP_INSTALL_DIR%\%%~nI.msg" (
:: echo Uninstalling "%ProgramFiles(x86)%\%APP_INSTALL_DIR%\%%I"
start /wait "Uninstall" "%ProgramFiles(x86)%\%APP_INSTALL_DIR%\%%I" %OPTIONS%
if !ERRORLEVEL! GTR !EXIT_CODE! set EXIT_CODE=!ERRORLEVEL!
)
)
:skip32bit
if not exist "%ProgramFiles%\%APP_INSTALL_DIR%" goto skip64bit
for /f %%I IN ('dir /O:-N /b "%ProgramFiles%\%APP_INSTALL_DIR%\unins*.exe"') DO (
if exist "%ProgramFiles%\%APP_INSTALL_DIR%\%%~nI.msg" (
:: echo Uninstalling "%ProgramFiles%\%APP_INSTALL_DIR%\%%I"
start /wait "Uninstall" "%ProgramFiles%\%APP_INSTALL_DIR%\%%I" %OPTIONS%
if !ERRORLEVEL! GTR !EXIT_CODE! set EXIT_CODE=!ERRORLEVEL!
)
)
:skip64bit
endlocal
exit /B %EXIT_CODE%
:end
:: pause
exit /b 0