Webex VDI Plugin (Un) Install
Hello,
I need help from the coding hive mind in here. I'm not entirely sure if this is the right r/ but I'm gonna give it a try.
I need to write a batch script which detects the current installed version of the webex vdi Plugin, uninstall if too old and install the new version.
My current script is supposed to check the registry key of Local Machine/software/windows/current version/uninstall/uuid and I use findstr to detect the version.
There I run into the first issue. It doesn't detect the version, therefore technically the script attempts to reinstall the Plugin every time it runs (every time the device starts).
I've confirmed that I've put in the correct reg key.
My second issue is that the Plugin won't install because it detects leftover components therefore saying the Plugin is already installed.
Apparently I cannot get a clean uninstall.
During my uninstall I delete the plugin folder in the program folders.
I also delete reg keys with previous uuids.
I have also tried running the webex removal tools, however they don't touch the Plugin.
Any ideas?
Note: I'm very aware there's proper software deployment tools and I would love to use them. However that isn't my decision to make, so I have to make do.
EDIT: added non-working code bits
finding version:
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C002B580-2B31-4EA7-86D9-2D561EA22285}" | findstr %DesiredVersion%
if %errorlevel%==1 (
goto NotFound
) else (
goto Found
)
next attempt:
set FoundVersion=
for /f "tokens=3" %%A in ('
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall /s /f "Webex VDI" ^
/v DisplayVersion 2^>nul
') do set FoundVersion=%%A
if "%FoundVersion%"=="%DesiredVersion%" (
goto Found
) else (
goto NotFound
)
Uninstalling:
"C:\ProgramData\Package Cache\{4e86d392-a2eb-4e31-bbe3-b8eac67f8567}\WebexVDIPlugin_AllinOne.exe" /uninstall /quiet
timeout /t 2 >nul
echo %date% %time% Deleting previous MSI versions >> %logshare%%ComputerName%.log
for %%G in (
{DAEC7710-1501-4709-A780-F130ADD69012}
{AF0B84EE-3FBB-4839-8F5D-32FDDEE9276F}
{611AD18D-000D-4ABB-84FD-CC503FDE8EC6}
{6B6748ED-A496-5575-87CD-113C4F3C0FC4}
{ED197C61-4718-4A44-B1E1-4D79352126FC}
{F8531F7D-71C0-7E08-63DF-9D048E6C00DC}
{7B85311F-11B3-7B2B-5FE2-838098E7BC7A}
) do (
msiexec /x %%G /qn /norestart
)