Remove Legacy client and replace with latest new client?
-
That sounds like a 100% legit method.
But if you’re patient, I’ll eventually post a script that will do it all.
-
Not to over emphasize PDQ Deploy here, but once you get it setup and create the first package (i.e. create a folder in the packages directory, drop in your MSI and if your install requires more steps create and test a cmd file to execute the multiple steps (only required for the free version) plus any additional files and save your package, then pick deploy select the computers out of an AD OU and hit deploy. You can’t do this with a script (well not as easy). You have a install trail with PDQ and can reissue jobs to failed systems all with the free version. The paid for version can do quite a bit more, no scripting required.
-
I just made a .bat with this inside and it looks to work fine.
@echo off msiexec /qn /x "FOG Service Installer.msi" msiexec /qn /i "FOGService.msi"
Thank you.
-
@Wayne-Workman I don’t know what change in old client but I wasn’t able to remove it using the msi of the “old client” freshly downloaded from GUI.
I had to use the .msi stored by system.Is there edit made in the last “old client” ?
-
@jmeyer I’m going to focus on this today - I’ll come up with something.
-
This post is deleted! -
This post is deleted! -
I spent this Sunday morning doing this, I got it going on my Win7 machine here.
I’ve been unsuccessful in getting it to run as a snapin through the Legacy FOG Client in the current trunk. Not sure what’s going on there, but my plan is to push this out as a startup script tomorrow at work for my office computers and see how it goes.
This checks for the existence of the fog.ca file, if it isn’t there, it runs the code to remove the old fog client and then pull the new one from the specified server and install it.
0_1450028485260_UpgradeFogClient.bat
It’d be appreciated if folks fill out my survey below.
-
@Wayne-Workman Downloading the client from server wasn’t something I have think about. Nice one.
It’s not “fog.ca.cer” that we should look for instead of “fog.ca” ?
I don’t think to have %ProgramFiles(x86)% under my 32 bits OS !I go lunch and I’ll look at this part this afternoon if you don’t do it before me.
edit :
IF %PROCESSOR_ARCHITECTURE%==amd64 SET programpath=Program Files ^(x86^) IF %PROCESSOR_ARCHITECTURE%==x86 SET programpath=Program Files IF NOT EXIST "%systemdrive%\%programpath%\FOG\fog.ca.cer" ( set FogServerIP=fog-server set GetID=wmic product where "Version like '3.0.29' and name like 'FOG Service'" get IdentifyingNumber for /F "skip=1 delims=" %%i in ('%GetID%') do if not defined ID set "ID=%%i" setlocal IF "%ID%" NEQ "" start /wait msiexec /x %ID% /q 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%" endlocal )
“set” doesn’t look to work when put after “setlocal” for me so I have moved it upper…
How are you sure that old client is version 3.0.29 ? -
@jmeyer Very nice improvement!
I love how we collaborate here. The beauties of open source.
-
@jmeyer said:
How are you sure that old client is version 3.0.29 ?
I pulled the latest FOG Trunk on Sunday at home, and installed the legacy client.
Running this command will return all software installed on Win7:
wmic product get > products.txt
and the legacy fog client reports that it is version 3.0.29.
-
So I’m not having any luck with either of the scripts, as a startup script or a shutdown script.
They run if I just double click on them. But not as a startup script through group policy.
I’m about to just test a simple script to remove the old client by ID - and then install the new client through group policy.
-
I ended up going with just a one-liner to uninstall the old client with msiexec by ID, and then I used Orca to edit the new MSI to point to the correct address, and I used Group Policy Software Deployment to push out the new MSI.
My building is officially running the new client.
-
@Wayne-Workman I don’t know the use of “setlocal”. I did my best keeping it since script wasn’t working at all without but I start to think it’s messing somewhere.
Maybe the “start /wait” is ignored because of this ?
I haven’t test it via GPO since my simple one made before was working fine but had to put all msi with it. -
@Wayne-Workman I’ll work a bit more on the script.
edit :IF %PROCESSOR_ARCHITECTURE%==AMD64 set programpath=%programfiles(x86)% IF %PROCESSOR_ARCHITECTURE%==x86 set programpath=%programfiles% IF EXIST "%programpath%\FOG\fog.ca.cer" GOTO END set FogServerIP=fogserver set GetID=wmic product where "Version like '3.0.29' and name like 'FOG Service'" get IdentifyingNumber for /F "skip=1 delims=" %%i in ('%GetID%') do if not defined ID set "ID=%%i" IF "%ID%" NEQ "" start /wait msiexec /x %ID% /q 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
This should works but I don’t know wwhy my download end in queue when there is nothing else to do and I can’t install client silently… I love computers…
-
@jmeyer That’s a lot cleaner, I like the GOTO END part. I haven’t seen that since I was studying a then-obsolete book on Visual Basic back in 1999 that I got for a quarter at a school library sale. It takes me back.
-
@Wayne-Workman Hi Wayne and co. Just trying these scripts now and have hit another hurdle in that the new client fails to install with error:
Failed to download CA certificate
I’ve searched the forum and can see that others have had this issue in the past but the solution was never made clear.
Suggestions? I’ve updated to latest git version this morning (15Dec15 around 1200 GMT).
regards Kiweegie
-
@Kiweegie Exactly what version of FOG are you on, what version of the new client?
-
@Wayne-Workman Hi Wayne
git log
shows as
git-svn-id: https://svn.code.sf.net/p/freeghost/code/trunk@4541 71f96598-fa45-0410-b640-bcd6f8691b32
However there are a couple of commits above that last of which is
commit f34289f60d81c9d95149e3bb78982ba017f6b932 Merge: 259e115 0918efb Author: Tom Elliott <tommygunsster@gmail.com> Date: Mon Dec 14 21:58:04 2015 -0500 Merge svn with dev-branch
The legacy client version on old machines is 3.0.29 - I can remove that manually or via script no problem. I don’t know what version the new client is as can’t install it and /var/www/html/fog/client doesn’t show a version number in text file etc.
I’ve also checked certmgr.msc on client machines in case there was already a new FOG client cert on there but nothing in evidence.
cheers, Kiweegie.
-