Firefox and Chrome in MigApp.xml

This topic contains 18 replies, has 4 voices, and was last updated by  weixing 1 year, 1 month ago.

  • Author
    Posts
  • #2708

    Samoht
    Participant

    For Firefox and Chrome, someone once used a lot of time setting up rules for migration of those.
    However it does not always work?

  • #2709

    admin
    Keymaster

    Yes you’re right.
    The attention has been brought to me by a customer, Mike Sobol, and the issue stems from the conditions set for the migration.
    In some scenarios they do not comply, although all checks indicate they should.

    Solution
    What is needed is to remove the migration [Conditions] on Firefox and Chrome in MigApp.xml

    Somewhere around line 6980 you take away

    [detection]
    [conditions]
    [condition]MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]”)[/condition]
    [condition]MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Mozilla\Mozilla Firefox\*.*\Main [PathToExe]”)[/condition]
    [/conditions]
    [/detection]

    And somewhere around line 7160 you remove

    [detection]
    [conditions]
    [condition]MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Google\Chrome\”)[/condition]
    [/conditions]
    [/detection]

    • This reply was modified 1 year, 2 months ago by  admin.
    • This reply was modified 1 year, 2 months ago by  admin.
    • This reply was modified 1 year, 2 months ago by  admin.
    • This reply was modified 1 year, 2 months ago by  admin.
    • This reply was modified 1 year, 2 months ago by  admin.
    • This reply was modified 1 year, 2 months ago by  admin.
    • This reply was modified 1 year, 2 months ago by  admin.
    • This reply was modified 1 year, 2 months ago by  admin.
  • #2768

    Mike
    Participant

    You could also just comment the area out like this

    For Mozilla FireFox line 6979-6984
    <!- – [detection]
    [conditions]
    [condition]MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]”)[/condition]
    [condition]MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Mozilla\Mozilla Firefox\*.*\Main [PathToExe]”)[/condition]
    [/conditions]
    [/detection] – ->

    For Google Chrome lines 7160-7164
    <!- – [detection]
    [conditions]
    [condition]MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Google\Chrome\”)[/condition]
    [/conditions]
    [/detection] – ->

    Also got it working by changing “%HklmWowSoftware% to “HKLM\Software

    • This reply was modified 1 year, 2 months ago by  Mike.
    • This reply was modified 1 year, 2 months ago by  Mike.
    • This reply was modified 1 year, 2 months ago by  Mike.
    • This reply was modified 1 year, 2 months ago by  Mike.
  • #2793

    admin
    Keymaster

    Hi Mike 🙂
    Yes, brilliant. Much better than deleting it.

    I’ve run a few tests and it works really well.
    /Sam

  • #2796

    weixing
    Participant

    Hi,Sam :
    I am glad to see your dialog about customize XML files’s modify to suit new version Application,as like chrome and firefox。I want to learn a standard method how to customize XML files suit new version application,because regedit value and local files is hard to understand it clear,I also use ProcessMonitor to mointor regedit and local files in application,but,I still don’t understand the essence.
    if i can get your help,I will be very grateful。
    /Xing

  • #2797

    weixing
    Participant

    One thing I don’t understand very well,IN MigApp.xml,winzip’s context is user,but most application’s context is userandsystem.
    if i install a applicaton on my os,How to know it is user or uerandsystem,How to understand this clearly?

  • #2798

    admin
    Keymaster

    Hi Wei

    For each component, ScanState checks the type of the component.
    If the current user profile is the system profile and the component type is “System” or “UserAndSystem”, the component is selected for this user. Otherwise, the component is ignored.

    Alternatively, if the current user profile is not the system profile and the component type is “User” or “UserAndSystem”, the component is selected for this user. Otherwise, this component is ignored.

    See more here under point 4.
    https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-how-it-works

    • This reply was modified 1 year, 1 month ago by  admin.
    • #2801

      weixing
      Participant

      So,In the original file of Migapp.xml, why context is user about WinZip? WinZip ?is it a problem ?why?
      —————————————————————————————————–
      For each selected component, ScanState evaluates the <rules> sections. For each <rules> section, if the current user profile is the system profile and the context of the <rules> section is “System” or “UserAndSystem”, the rule is processed further. Otherwise, this rule is ignored. Alternatively, if the current user profile is not the system profile and the context of the <rules> section is “User” or “UserAndSystem”, the rule is processed further. Otherwise, this rule is ignored.

  • #2800

    weixing
    Participant

    So,can you talk about customize XML files to suit new version Application ?I want to know your answer。
    thanks!
    /Xing

  • #2802

    Samoht
    Participant

    Hi Xing

    user will collect settings for the application under each user.
    HKCU\software in registry

    System will collect settings for the application for the system.
    HKLM\software in registry.

    UserAndSystem do both.

    Please:
    Read Microsoft technical documentation on how to customize your own XML files.

    • #2804

      weixing
      Participant

      thanks ,thanks your answering。

  • #2805

    weixing
    Participant

    <!– Mozilla Firefox –>
    <component context=”UserAndSystem” type=”Application”>
    <displayName _locID=”migapp.firefox”>Mozilla Firefox</displayName>
    <environment name=”GlobalEnv”/>
    <environment name=”GlobalEnvX64″/>
    <role role=”Settings”>
    <detection>
    <conditions>
    <condition>MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]”)</condition>
    <condition>MigXmlHelper.DoesObjectExist(“Registry”,”%HklmWowSoftware%\Mozilla\Mozilla Firefox\*.*\Main [PathToExe]”)</condition>
    </conditions>
    </detection>
    <rules context=”User”>
    <destinationCleanup>
    <objectSet>
    <pattern type=”File”>%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\*\Cache\* [*]</pattern>
    </objectSet>
    </destinationCleanup>
    <include>
    <objectSet>
    <pattern type=”File”>%CSIDL_APPDATA%\Mozilla\Firefox\* [*]</pattern>
    <pattern type=”File”>%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\* [*]</pattern>
    </objectSet>
    </include>
    <exclude>
    <objectSet>
    <pattern type=”File”>%CSIDL_APPDATA%\Mozilla\Firefox\Crash Reports\* [*]</pattern>
    <pattern type=”File”>%CSIDL_APPDATA%\Mozilla\Firefox\Profiles\*\ [pluginreg.dat]</pattern>
    <pattern type=”File”>%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\*\Cache\* [*]</pattern>
    </objectSet>
    </exclude>
    <merge script=”MigXmlHelper.SourcePriority()”>
    <objectSet>
    <pattern type=”File”>%CSIDL_APPDATA%\Mozilla\Firefox\* [*]</pattern>
    <pattern type=”File”>%CSIDL_LOCAL_APPDATA%\Mozilla\Firefox\Profiles\* [*]</pattern>
    </objectSet>
    </merge>
    </rules>
    </role>
    </component>
    </migration>
    —————————-
    scanstate.exe .\1715 /i:MigFirefox.xml /ue:*\* /ui:%computername%\administrator
    loadstate.exe .\1715 /i:MigFirefox.xml /ue:*\* /ui:%computername%\administrator
    ——————————
    Hi,Sam,firefox’s data is still not successful to migration,code is above,please help me.I would be very grateful

  • #2806

    admin
    Keymaster

    Hi Xing

    In my MigApp.xml, see XML reference files (just updated) I have removed the Detection, as it sometimes fails.

    Try downloading and have a look at MigApp at line 6979 to 6984 (use Notepad++)

    <!-- <detection> <conditions> <condition>MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]")</condition> <condition>MigXmlHelper.DoesObjectExist("Registry","%HklmWowSoftware%\Mozilla\Mozilla Firefox\*.*\Main [PathToExe]")</condition> </conditions> -->

    They are remarked and then it works..

    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • #2871

      weixing
      Participant

      Yeah,after I have removed the Detection,it is successful。why? why have must removed the detection?I do not understand。I examine regeister value,it is right。why?

  • #2872

    admin
    Keymaster

    I think I figured it out:

    In the top of the MigApp.xml file, line 11 to line 40, conditions for the
    %HklmWowSoftware% variable is set.

    If on a 64bit PC, it is set to point to
    HKLM\SOFTWARE\Wow6432Node
    and USMT will look in
    HKLM\SOFTWARE\Wow6432Node\Mozilla\Mozilla Firefox

    But IF you have a 64bit Firefox installed, it is NOT there.
    It will be in
    HKLM\SOFTWARE\Mozilla\Mozilla Firefox
    So, the condition fails..

    I bet this check was made for 32/64 bit Windows BEFORE Firefox X64 came.
    – So back then it worked…

    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • This reply was modified 1 year, 1 month ago by  admin.
    • #2884

      weixing
      Participant

      Hi ,Sam
      HaHa,you still have experience。I know it。thanks!
      By the way,this detection’s function is? no detection also is good, it is important for detection ,so why?talk about it。

    • #2885

      weixing
      Participant

      Some application is in HKLM\SOFTWARE\Wow6432Node,for example google chorme,some application is in HKLM\SOFTWARE,for example firefox.
      SO,in GlobalEnvX64,I modify it,is it ok,do you think?
      <variable name=”HklmWowSoftware”>
      <text>HKLM\SOFTWARE\Wow6432Node</text>
      <text>HKLM\SOFTWARE</text>
      </variable>
      ———————————————
      <?xml version=”1.0″ encoding=”UTF-8″?>
      <migration urlid=”http://www.microsoft.com/migration/1.0/migxmlext/migchrome”>
      <library prefix=”MigSysHelper”>MigSys.dll</library>
      <_locDefinition>
      <_locDefault _loc=”locNone”/>
      <_locTag _loc=”locData”>displayName</_locTag>
      </_locDefinition>
      <namedElements>
      <!– Global –>
      <environment name=”GlobalEnvX64″>
      <conditions>
      <condition>MigXmlHelper.IsNative64Bit()</condition>
      </conditions>
      <variable name=”HklmWowSoftware”>
      <text>HKLM\SOFTWARE\Wow6432Node</text>
      <text>HKLM\SOFTWARE</text>
      </variable>
      <variable name=”ProgramFiles32bit”>
      <text>%ProgramFiles(x86)%</text>
      </variable>
      <variable name=”CommonProgramFiles32bit”>
      <text>%CommonProgramFiles(x86)%</text>
      </variable>
      </environment>
      <environment name=”GlobalEnv”>
      <conditions>
      <condition negation=”Yes”>MigXmlHelper.IsNative64Bit()</condition>
      </conditions>
      <variable name=”HklmWowSoftware”>
      <text>HKLM\Software</text>
      </variable>
      <variable name=”ProgramFiles32bit”>
      <text>%ProgramFiles%</text>
      </variable>
      <variable name=”CommonProgramFiles32bit”>
      <text>%CommonProgramFiles%</text>
      </variable>
      </environment>

    • #2887

      weixing
      Participant

      %HklmWowSoftware%=Hklm\Software\Wow6432Node,so
      Hklm\software=%……..%,What is the expression of the wildcard?

  • #2886

    weixing
    Participant

    I am wrong ,I would not to modify eniverment,but is to midify it.thanks
    <condition>MigXmlHelper.DoesObjectExist(“Registry”,”%HklmSoftware%\Mozilla\Mozilla Firefox *.*\bin [PathToExe]”)</condition>
    <condition>MigXmlHelper.DoesObjectExist(“Registry”,”%HklmSoftware%\Mozilla\Mozilla Firefox\*.*\Main [PathToExe]”)</condition>

You must be logged in to reply to this topic.