Remove a Registry Key
-
@maouu I know tightvnc, so I’m going to ask what is your goal here. Do you want to preset these values using regedit? If so there is a different way to go about this that we use.
-
@george1421 At the beginning I just wanted to make a script to uninstall VNC completely and cleanly so I could reinstall it with the right settings on my computer park.
I realized that just by editing the registry [HKEY_LOCAL_MACHINE \ SOFTWARE \ TightVNC \ Server] it worked.I want to add the following elements:
“IpAccessControl” = “192.168.2.0-192.168.2.255: 2,192.168.3.0-192.168.3.255: 2,192.168.4.0-192.168.4.255: 2,192.168.7.0-192.168.7.255: 2,192.168.8.0-192.168.8.255: 2”
“QueryTimeout” = dword: 0000001e
“QueryAcceptOnTimeout” = dword: 00000001
When I run my script:
regedit.exe / s “http://192.168.1.6/fog/package/FOG/Key_TightVNC.reg” I get a code 0 in Host Snapin History but the registry is not changed -
@maouu Here is how we deploy with PDQ Deploy (sorry I don’t use snapins but the install function is similar:
@Echo Off start /wait dfmirage-setup-2.0.301.exe /verysilent /norestart REM Hack to determine arch of this system IF EXIST C:\Windows\SysWOW64\diskpart.exe GOTO :x64 :x86 msiexec /i tightvnc-2.7.10-setup-32bit.msi /qn /norestart ADDLOCAL="Server" SERVER_REGISTER_AS_SERVICE=1 SERVER_ADD_FIREWALL_EXCEPTION=1 SERVER_ALLOW_SAS=1 SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=<SetMe!!> SET_USECONTROLAUTHENTICATION=1 VALUE_OF_USECONTROLAUTHENTICATION=1 SET_CONTROLPASSWORD=1 VALUE_OF_CONTROLPASSWORD=<SetMe2!!> SET_IPACCESSCONTROL=1 VALUE_OF_IPACCESSCONTROL="192.168.0.0-192.168.255.255:2,0.0.0.0-192.167.255.255:1,192.169.0.0-255.255.255.255:1" SET_REMOVEWALLPAPER=1 VALUE_OF_REMOVEWALLPAPER=1 :x64 msiexec /i tightvnc-2.7.10-setup-64bit.msi /qn /norestart ADDLOCAL="Server" SERVER_REGISTER_AS_SERVICE=1 SERVER_ADD_FIREWALL_EXCEPTION=1 SERVER_ALLOW_SAS=1 SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=<SetMe!!> SET_USECONTROLAUTHENTICATION=1 VALUE_OF_USECONTROLAUTHENTICATION=1 SET_CONTROLPASSWORD=1 VALUE_OF_CONTROLPASSWORD=<SetMe2!!> SET_IPACCESSCONTROL=1 VALUE_OF_IPACCESSCONTROL="192.168.0.0-192.168.255.255:2,0.0.0.0-192.167.255.255:1,192.169.0.0-255.255.255.255:1" SET_REMOVEWALLPAPER=1 VALUE_OF_REMOVEWALLPAPER=1 :Exit REM Install done, errors generated by msi will be reported to installer net stop "TightVNC Server" net start "TightVNC Server" rmdir /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TightVNC\"
I’m pretty sure if you reinstall with the new parameters they will overwrite what is in the registry. I know this ISN’T what you are looking for, but it works for us.