Remove Legacy client and replace with latest new client?



  • I have about 300 machines which were all imaged with an earlier FOG version (started using it back in late 0.2X days).

    These machines have the legacy client on them and I’m keen to deploy the latest client in its place (0.9.9 I believe). I’ve searched the forums and can see that others have asked the question and can see some people mentioning GPO to remove the old one amongst other things. Is that the best accepted way or can the client update be done all through FOG itself?

    I’m guessing the client itself is used during snapin deployment so we can’t snapin this? And I found the client updater within the FOG configuration window in the GUI can that be used in some way to update the client or is that just for things like GreenFOG etc?

    When last I investigated this I think the client had to be built into the image itself though I’d prefer to just update the client rather than completely reimage.

    regards, Kiweegie.



  • @Wayne-Workman Sorry Wayne ignore last re fog certificate. Issue was only on my laptop and has since been resolved.



  • @Wayne-Workman Hi Wayne, keeping an eye on all the scripting tweaks for removing old client and installing new one however I’m still facing issue with installing new client and getting error:

    “Failed to download CA certificate”

    This has happened to others and in this post it stated that the new client can only be downloaded and installed in conjunction with the new development versions of FOG. Another user had issue on the development version and Tom Elliot had to remote in and edit some files to get it to work - wondering if mine needs something similar?

    Happy to edit the files needed if I can be given some guidance on what to look for.

    regards Kiweegie.



  • @Wayne-Workman Nevermind.


  • Moderator

    @jmeyer said:

    How detect that 0.9.9 is seen as 0.9.7 ?

    @jmeyer What?



  • @Tom-Elliott How detect that 0.9.9 is seen as 0.9.7 ?
    I need help for the code… I am stuck.


  • Senior Developer

    @jmeyer That is 100% untrue.

    I say this because while what you’re saying may be true in your environment, it’s not the actual case of the “big problem”.

    How do I know this?

    I have tested this and so has @jbob.

    We’ve installed 0.9.7 on a system, and then watched as it miraculously updated to 0.9.9. (Miraculously being that we didn’t do anything other than watch and Client 0.9.7 did update itself).



  • @Tom-Elliott Client 0.9.7 doesn’t update itself. That’s the big problem.


  • Senior Developer

    @jmeyer I think the best bet would be to see if you can add a few checks. First you need to see if the legacy client is installed and remove it if it does exist. Second, if there is not other client installed, install A NEW client. I emphasize on the A in hopes it means installing one. Don’t scan for a version and only install the new client if there isn’t one installed. The new client will update itself so there should be no need to specify one version over another.



  • @Wayne-Workman Upgrading to 0.9.7 was a very bad idea ! lol
    https://forums.fogproject.org/topic/6368/client-updater-loop

    Now i need to review the script to remove 0.9.7 and 0.9.9 is both are installed…
    Any idea how to do this ?

    I temporary did this since i have no other choice :

    ::v3.2 - Thanks to Wayne Workman, Robza
    start /wait wmic product where "Version like '0.9.7' and name like 'FOG Service'" call uninstall /nointeractive
    start /wait wmic product where "Version like '0.9.9' and name like 'FOG Service'" call uninstall /nointeractive
    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
    


  • @Wayne-Workman https://forums.fogproject.org/topic/6353/upgrade-client-from-0-9-7-to-0-9-9/3
    I don’t know yet how it happened I don’t have this on every host.
    Maybe I am just unlucky. lol


  • Moderator

    @jmeyer said:

    Client 0.9.9 doesn’t remove or upgrade version 0.9.7

    @Jbob Is that a good thing?



  • @Wayne-Workman

    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.



  • @robza said:

    wmic product where “name = ‘FOG Service’” call uninstall /nointeractive

    I tested twice and it removes the new client even after I checked that name was “FOGService” without space.

    C:\Users\administrateur>wmic product where "name = 'FOG Service'" call uninstall
    
    Exécution (\\MANAGEMENT7\ROOT\CIMV2:Win32_Product.IdentifyingNumber="{FA5F2860-A
    80B-46B9-9EF9-8228C3E9A663}",Name="FOG Service",Version="0.9.9")->Uninstall()
    Méthode exécutée.
    Paramètres de sortie :
    instance of __PARAMETERS
    {
            ReturnValue = 0;
    };
    


  • To uninstall old fog client and install new I’m using this script.

    wmic product where "name = 'FOG Service'" call uninstall /nointeractive
    
    copy \\upow-8.intranet\Public\FOGService\FOGService.msi c:\windows\temp\
    
    %systemroot%\system32\msiexec.exe /i c:\windows\temp\FOGService.msi /qb
    
    sc start "FogService"
    

    On client must be .Net framework 4 installed.
    Regards



  • @Wayne-Workman Hi Wayne, yes I edited fogserver variable to be my actua FOG server dns name… :)

    Note the issue is not with the script per se. at least not in my case but one of the CA Cert not being found or downloaded for FOG new client.

    regards Kiweegie.



  • @Wayne-Workman Wasn’t in same high school. I didn’t create new DNS entry yet. I changed just to test the script. I’ll set fog-server right now ! lol
    I just tested my script after installing old client and all look to work.

    I just installed the msi stored on windows and it’s smaller than the one in SVN but has the same version… Exactly 3ko less…
    Who the hell repack the client and don’t change the version ? :angry:

    Here is the one I had : 0_1450198784192_FOG Service Installer Old.msi 784 ko

    Anyway, script works fine using “IdentifyingNumber”.

    @Kiweegie I only had this when old client wasn’t removed.


  • Moderator

    @Kiweegie Did you change the FOG server’s IP / Name in the script?

    set FogServerIP=fogserver
    

    ???



  • @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.


  • Moderator

    @Kiweegie Exactly what version of FOG are you on, what version of the new client?


Log in to reply
 

722
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.