locked
How to Merge *.reg File From Code RRS feed

  • Question

  • Hello,

    Reg files usually are merged automatically during Cold Boot.  Is there a way of merging a reg file from code? (Something different than reading the file, parsing it and manually calling  Reg functions from API.)  The only thing I was able to find out about the issue was information about existance of RegMerge.dll.

    Thanks,

    Artur

    Thursday, August 10, 2006 2:55 PM

Answers

  • Good point. However, if you actually choose that item it would ask you "If you'd like to add it to registry" not if you'd like to "merge it". Menu in regedit states "Import". Another point would be what not everybody’s using explorer to import/merge/add registry files, some prefer command line or Start/Regedit/Import and might never see explorer's menu. Not to mention Windows menus might be localized to a few dozen languages and “Merge” you see in your copy might be quite different somewhere else. So, there's some impedance mismatch in terminology which I believe should be cleared up by now, as well as your initial question, is that right?

     

    Thursday, August 10, 2006 7:30 PM

All replies

  • If you mean registry editor files, there's nothing to process or parse them files on device. You would have to write .reg file parser and "merger" (whatever you mean by that) yourself.

    Thursday, August 10, 2006 3:50 PM
  • Ilya,

    It is enough to put a *.reg file (registry editor file:)) in /Application folder and perform Cold Boot to have all registry entries merged.  Unless this is something specific to my device, your statement "there's nothing to process or parse them files on device" is not true.  Also, I didn't use "merger" term in my post, therefore I don't get your remark.

    Thanks,

    Thursday, August 10, 2006 4:34 PM
  • There's no registry editor on most Pocket PC or SP devices. Some vertical market devices (which I suspect you're working with) might have special capabilities/applications from device vendor not available in general. For example, this "Application" folder is specific to Symbol devices as far as I remember.

    As to "merger", "merge" might mean "joining several .reg files into one" and you're probably using it as "entering data from .reg file into device registry", the term which is, again, specific to Symbol documentation. For example, desktop regedit calls it “import”. So "merger" (as in something what does “merge”) might do different things depending on whatever "merge" means.

     

    Thursday, August 10, 2006 5:03 PM
  • Ilya,

    As far as the terminology is concerned, well, I found the explanation quite entertaining.  Could you right click on any file with extension "reg" (on PC running MS Windows).  The first item in the pop-up menu would be "Merge."  Does it "join several .reg files into one?" 

    Artur

    Thursday, August 10, 2006 6:19 PM
  • Good point. However, if you actually choose that item it would ask you "If you'd like to add it to registry" not if you'd like to "merge it". Menu in regedit states "Import". Another point would be what not everybody’s using explorer to import/merge/add registry files, some prefer command line or Start/Regedit/Import and might never see explorer's menu. Not to mention Windows menus might be localized to a few dozen languages and “Merge” you see in your copy might be quite different somewhere else. So, there's some impedance mismatch in terminology which I believe should be cleared up by now, as well as your initial question, is that right?

     

    Thursday, August 10, 2006 7:30 PM
  • I'd also like to execute regmerge from within my code.  It's easy to do:

    //call regmerge application to merge the reg file in.

    ProcessStartInfo psi = new ProcessStartInfo();

    psi.FileName = "regmerge";

    psi.Arguments = string.Format(@"\Application\airbeam.reg");

    Process p = Process.Start(psi);

    p.WaitForExit();

    But here's the trouble.  It always pops up a message box asking the user to hit enter to merge the files (or select the "no" button to skip the merge).  I would much prefer that my user was not bothered with this popup box and that the merge just happened automatically. Is there a way to launch regmerge in silent mode or something?  Thanks.

    Tuesday, February 13, 2007 3:43 PM
  • The App you are running to merge/import/whatever, 'regmerge' is a Symbol specific application, not part of the Microsoft offerings for the CE/WM platform(s).  I'd ask it in the Symbol support forums on their website.  It is not a solution or suggestion for non-Symbol devices.

    I am not aware of a registry '.reg' file parser that will import/merge/whatever the contents of a file into a device registry that is available as a stand alone app or in source code form, but I'd be interested if there was such an animal, especially in source code format. 

    Wednesday, February 14, 2007 1:20 AM
  • Thanks, Steven, I'll post there!
    Wednesday, February 14, 2007 4:58 PM
  • Through some trial-and-error, I've found that "-q" is the magic parameter that suppresses the prompt.  Give that a try.

    regmerge -q \Application\airbeam.reg
    • Proposed as answer by Yuriken Friday, August 20, 2010 7:11 PM
    Thursday, March 13, 2008 11:04 PM
  • regmerge, is this a 3rd party app or what, I am looking to do the same thing, but im using reg import.
    Wednesday, July 16, 2008 2:26 PM