Here is the new version using robza command for removing the old client that makes.
We reduce a bit the size of the script this way and I just realized that one IF was useless.
I hope I didn’t miss something because I am putting it in GPO ! lol
::v3.1 - Thanks to Wayne Workman, Robza
set programpath=%programfiles(x86)%
IF %PROCESSOR_ARCHITECTURE%==x86 set programpath=%programfiles%
IF EXIST "%programpath%\FOG\fog.ca.cer" GOTO END
set FogServerIP=fog-server
start /wait wmic product where "Version like '3.0.29' and name like 'FOG Service'" call uninstall /nointeractive
start /wait bitsadmin /transfer FOGService /download /priority normal http://%FogServerIP%/fog/client/FOGService.msi %temp%\FOGService.msi
start /wait msiexec /i %temp%\FOGService.msi /quiet WEBADDRESS="%FogServerIP%"
:END
Just found a bug on my side.
Client 0.9.9 doesn’t remove or upgrade version 0.9.7 and I end with 2 “FOG Service” in add/remove software panel.
Removing the 0.9.7 doesn’t impact the install of the 0.9.9.
Maybe it’s something to add to script.



