/build/static/layout/Breadcrumb_cap_w.png

TightVNC Server - deploy silently, non persistent VDI and launch tvnserver.exe silently!

 Howdy,


I've got a challenge on a client site to provide a VNC client so some dashboard desktops can be remotely configured. The desktops need to login seamlessly, no interaction from the user, and then install and launch the TightVNC Server in Application Mode (i.e. launch tvnserver.exe ). 


The TightVNC Server component needs to install silently (which I can do using their .MSI switches and some powershell/.bat) - the issue I have is I need to run 2x additional commands after the installation completes:

1. ...tvnserver.exe -install -silent (register the service with the OS)

2. ...tvnserver.exe - this starts the app in 'Application Mode'


I have a problem with 2. - the app prompts to add Windows Firewall Inbound rules to the Domain profile - if I click OK, great, it works, but I need these rules to be added silently without user interaction.  If I add -silent switch, it adds the rules to WF (with an .msi error prompt because the -silent switch isn't valid with .exe) but the rules are not enabled (they're effectively dud) - because UAC blocks them. I've tried using UEM to elevate the privileges for C:\prog files\tightvnc\tvnserver.exe and then using the -silent trick , no dice! The rules are added but they're disabled/dud because UAC still prevents it. Basically the only method that works is to launch tvnserver.exe as the logged in user, then click 'Allow access' to add the rules into the firewall .


Does any one have any other ideas around this? I had considered adding the WF rules in using GPO, but the machine does not have TightVNC installed at the point GPO is processed, so I'm not sure having the rules pre-existing will work. I cannot add TightVNC to our desktop image, this must all work in a non-persistent environment and dynamically created.


Any alternative products/ideas would be greatly appreciated!


Thanks

Dave


0 Comments   [ + ] Show comments

Answers (1)

Posted by: daniel.soller 4 years ago
White Belt
0

Hi

This script is created with the PowerShell tool Scripting Framework.

Our PowerShell Engine offers numerous functions that are required for the software packaging, general scripting and the eventual deployment. It simplifies the complex challenges in your company that you will encounter more and more in this area.

For more information see https://www.scriptingframework.ch/



# ===================================================================================================

# Installation

# ===================================================================================================


# Uninstall when present

 If ((SF-Installed "{4E62B79C-931E-413C-878B-A9130B5BC61B}") -eq $True) {

    SF-Taskkill "%_ProgramFiles64%\UltraVnc"

    SF-MSIUninstall "{4E62B79C-931E-413C-878B-A9130B5BC61B}" "/qn /norestart"

 } 


# Installation

 SF-MSIInstall "%_PkgSource%\Setup\UltraVnc_1224_X64.msi" "TRANSFORMS=""%_PkgSource%\Setup\NoViewer.mst"" ALLUSERS=""1"" SERVER=""1"" SERVICE=""1"" INSTALLLEVEL=""1"" TARGETDIR=""%_ProgramFiles64%\UltraVnc"" /qn /norestart"

 SF-Wait "winvnc.exe"

 SF-Taskkill "%_ProgramFiles64%\UltraVnc"


# Add Firewall Settings

 SF-Run "netsh.exe" "advfirewall firewall add rule name=""UltraVNC"" dir=in action=allow program=""%_ProgramFiles64%\UltraVnc\winvnc.exe"" enable=yes" -Wait


# Delete Shortcuts

 SF-Delete "%_CommonDesktop%\UltraVNC Server.lnk"

 SF-Delete "%_CommonDesktop%\UltraVNC Settings.lnk"

 SF-Delete "%_CommonPrograms%\UltraVNC Server.lnk"

 SF-Delete "%_CommonPrograms%\UltraVNC Settings.lnk"


# Copy Config

 SF-Copy "%_PkgSource%\Setup\ProgramFiles64" "%_ProgramFiles64%" -Changed


# Start Service

 SF-Service "uvnc_service" -Start


# ===================================================================================================

# END

# ===================================================================================================



Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ