Modifying Windows registry from within Linux











up vote
4
down vote

favorite












I have a windows dd image that I have locally mounted.



I need to apply a series of registry tweaks from a known .reg file, within this Linux environment. I can't seem to find any tool that satisfies this.



I have found regpatch and hivexsh but they don't seem to do what I need, or I'm using them terribly wrong. Are there any working examples of performing such a task?










share|improve this question






















  • Not sure if this would work but you could try booting the dd image in a virtual machine and then applying the fixes from within the actual windows environment. You might need to take an image of the changed machine at the end. Again, not at all sure if this is possible but it might be worth a try.
    – terdon
    Mar 18 '13 at 20:44















up vote
4
down vote

favorite












I have a windows dd image that I have locally mounted.



I need to apply a series of registry tweaks from a known .reg file, within this Linux environment. I can't seem to find any tool that satisfies this.



I have found regpatch and hivexsh but they don't seem to do what I need, or I'm using them terribly wrong. Are there any working examples of performing such a task?










share|improve this question






















  • Not sure if this would work but you could try booting the dd image in a virtual machine and then applying the fixes from within the actual windows environment. You might need to take an image of the changed machine at the end. Again, not at all sure if this is possible but it might be worth a try.
    – terdon
    Mar 18 '13 at 20:44













up vote
4
down vote

favorite









up vote
4
down vote

favorite











I have a windows dd image that I have locally mounted.



I need to apply a series of registry tweaks from a known .reg file, within this Linux environment. I can't seem to find any tool that satisfies this.



I have found regpatch and hivexsh but they don't seem to do what I need, or I'm using them terribly wrong. Are there any working examples of performing such a task?










share|improve this question













I have a windows dd image that I have locally mounted.



I need to apply a series of registry tweaks from a known .reg file, within this Linux environment. I can't seem to find any tool that satisfies this.



I have found regpatch and hivexsh but they don't seem to do what I need, or I'm using them terribly wrong. Are there any working examples of performing such a task?







windows linux windows-registry






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 18 '13 at 20:37









Ryan

12613




12613












  • Not sure if this would work but you could try booting the dd image in a virtual machine and then applying the fixes from within the actual windows environment. You might need to take an image of the changed machine at the end. Again, not at all sure if this is possible but it might be worth a try.
    – terdon
    Mar 18 '13 at 20:44


















  • Not sure if this would work but you could try booting the dd image in a virtual machine and then applying the fixes from within the actual windows environment. You might need to take an image of the changed machine at the end. Again, not at all sure if this is possible but it might be worth a try.
    – terdon
    Mar 18 '13 at 20:44
















Not sure if this would work but you could try booting the dd image in a virtual machine and then applying the fixes from within the actual windows environment. You might need to take an image of the changed machine at the end. Again, not at all sure if this is possible but it might be worth a try.
– terdon
Mar 18 '13 at 20:44




Not sure if this would work but you could try booting the dd image in a virtual machine and then applying the fixes from within the actual windows environment. You might need to take an image of the changed machine at the end. Again, not at all sure if this is possible but it might be worth a try.
– terdon
Mar 18 '13 at 20:44










3 Answers
3






active

oldest

votes

















up vote
4
down vote













I think what you are looking for is chntpw (it's the same as mentioned in Ben's question, btw). It comes as package (Ubuntu sudo apt-get install chntpw) with modern distros and allows listing or editing the registry, given the hive file of a Windows installation. Hive files are ntuser.dat in the profile directories of user as well as the files under %SystemRoot%system32config such as software.



From the man chntpw page:



-e     Registry editor with limited capabilities.


Caution: keep in mind that the format isn't officially documented by Microsoft and therefore any third-party editing tools could potentially damage the hives they load and manipulate. Take a backup!





As for applying a .reg file I don't think you'll get around parsing it yourself. It is basically just an INI/INF file with a special first line and sections named after the keys and values that have been escaped according to the type of the value. @ is a special value name for the default key. The rest is self-evident from looking at the file.



Python comes with built-in capabilities to parse INI files, so it provides a good starting point.






share|improve this answer






























    up vote
    1
    down vote













    I’d start having a sniff around http://www.pogostick.net/~pnh/ntpasswd/ as I’m aware it may have some basic tools to get you there.






    share|improve this answer




























      up vote
      0
      down vote













      If you need a GUI tool, you can use RegeditEx. It is written in Java, so Java Runtime Environment should be installed.






      share|improve this answer





















      • Please read how to recommend software in answers, particularly the bits in bold; then edit your answer to follow the guidelines there. Thanks!
        – bertieb
        Nov 18 at 12:17











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














       

      draft saved


      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f567945%2fmodifying-windows-registry-from-within-linux%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      4
      down vote













      I think what you are looking for is chntpw (it's the same as mentioned in Ben's question, btw). It comes as package (Ubuntu sudo apt-get install chntpw) with modern distros and allows listing or editing the registry, given the hive file of a Windows installation. Hive files are ntuser.dat in the profile directories of user as well as the files under %SystemRoot%system32config such as software.



      From the man chntpw page:



      -e     Registry editor with limited capabilities.


      Caution: keep in mind that the format isn't officially documented by Microsoft and therefore any third-party editing tools could potentially damage the hives they load and manipulate. Take a backup!





      As for applying a .reg file I don't think you'll get around parsing it yourself. It is basically just an INI/INF file with a special first line and sections named after the keys and values that have been escaped according to the type of the value. @ is a special value name for the default key. The rest is self-evident from looking at the file.



      Python comes with built-in capabilities to parse INI files, so it provides a good starting point.






      share|improve this answer



























        up vote
        4
        down vote













        I think what you are looking for is chntpw (it's the same as mentioned in Ben's question, btw). It comes as package (Ubuntu sudo apt-get install chntpw) with modern distros and allows listing or editing the registry, given the hive file of a Windows installation. Hive files are ntuser.dat in the profile directories of user as well as the files under %SystemRoot%system32config such as software.



        From the man chntpw page:



        -e     Registry editor with limited capabilities.


        Caution: keep in mind that the format isn't officially documented by Microsoft and therefore any third-party editing tools could potentially damage the hives they load and manipulate. Take a backup!





        As for applying a .reg file I don't think you'll get around parsing it yourself. It is basically just an INI/INF file with a special first line and sections named after the keys and values that have been escaped according to the type of the value. @ is a special value name for the default key. The rest is self-evident from looking at the file.



        Python comes with built-in capabilities to parse INI files, so it provides a good starting point.






        share|improve this answer

























          up vote
          4
          down vote










          up vote
          4
          down vote









          I think what you are looking for is chntpw (it's the same as mentioned in Ben's question, btw). It comes as package (Ubuntu sudo apt-get install chntpw) with modern distros and allows listing or editing the registry, given the hive file of a Windows installation. Hive files are ntuser.dat in the profile directories of user as well as the files under %SystemRoot%system32config such as software.



          From the man chntpw page:



          -e     Registry editor with limited capabilities.


          Caution: keep in mind that the format isn't officially documented by Microsoft and therefore any third-party editing tools could potentially damage the hives they load and manipulate. Take a backup!





          As for applying a .reg file I don't think you'll get around parsing it yourself. It is basically just an INI/INF file with a special first line and sections named after the keys and values that have been escaped according to the type of the value. @ is a special value name for the default key. The rest is self-evident from looking at the file.



          Python comes with built-in capabilities to parse INI files, so it provides a good starting point.






          share|improve this answer














          I think what you are looking for is chntpw (it's the same as mentioned in Ben's question, btw). It comes as package (Ubuntu sudo apt-get install chntpw) with modern distros and allows listing or editing the registry, given the hive file of a Windows installation. Hive files are ntuser.dat in the profile directories of user as well as the files under %SystemRoot%system32config such as software.



          From the man chntpw page:



          -e     Registry editor with limited capabilities.


          Caution: keep in mind that the format isn't officially documented by Microsoft and therefore any third-party editing tools could potentially damage the hives they load and manipulate. Take a backup!





          As for applying a .reg file I don't think you'll get around parsing it yourself. It is basically just an INI/INF file with a special first line and sections named after the keys and values that have been escaped according to the type of the value. @ is a special value name for the default key. The rest is self-evident from looking at the file.



          Python comes with built-in capabilities to parse INI files, so it provides a good starting point.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 18 '13 at 21:38

























          answered Mar 18 '13 at 20:54









          0xC0000022L

          3,29243767




          3,29243767
























              up vote
              1
              down vote













              I’d start having a sniff around http://www.pogostick.net/~pnh/ntpasswd/ as I’m aware it may have some basic tools to get you there.






              share|improve this answer

























                up vote
                1
                down vote













                I’d start having a sniff around http://www.pogostick.net/~pnh/ntpasswd/ as I’m aware it may have some basic tools to get you there.






                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  I’d start having a sniff around http://www.pogostick.net/~pnh/ntpasswd/ as I’m aware it may have some basic tools to get you there.






                  share|improve this answer












                  I’d start having a sniff around http://www.pogostick.net/~pnh/ntpasswd/ as I’m aware it may have some basic tools to get you there.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 18 '13 at 20:53









                  Ben Lavender

                  55326




                  55326






















                      up vote
                      0
                      down vote













                      If you need a GUI tool, you can use RegeditEx. It is written in Java, so Java Runtime Environment should be installed.






                      share|improve this answer





















                      • Please read how to recommend software in answers, particularly the bits in bold; then edit your answer to follow the guidelines there. Thanks!
                        – bertieb
                        Nov 18 at 12:17















                      up vote
                      0
                      down vote













                      If you need a GUI tool, you can use RegeditEx. It is written in Java, so Java Runtime Environment should be installed.






                      share|improve this answer





















                      • Please read how to recommend software in answers, particularly the bits in bold; then edit your answer to follow the guidelines there. Thanks!
                        – bertieb
                        Nov 18 at 12:17













                      up vote
                      0
                      down vote










                      up vote
                      0
                      down vote









                      If you need a GUI tool, you can use RegeditEx. It is written in Java, so Java Runtime Environment should be installed.






                      share|improve this answer












                      If you need a GUI tool, you can use RegeditEx. It is written in Java, so Java Runtime Environment should be installed.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Nov 18 at 11:42









                      Sauron

                      11




                      11












                      • Please read how to recommend software in answers, particularly the bits in bold; then edit your answer to follow the guidelines there. Thanks!
                        – bertieb
                        Nov 18 at 12:17


















                      • Please read how to recommend software in answers, particularly the bits in bold; then edit your answer to follow the guidelines there. Thanks!
                        – bertieb
                        Nov 18 at 12:17
















                      Please read how to recommend software in answers, particularly the bits in bold; then edit your answer to follow the guidelines there. Thanks!
                      – bertieb
                      Nov 18 at 12:17




                      Please read how to recommend software in answers, particularly the bits in bold; then edit your answer to follow the guidelines there. Thanks!
                      – bertieb
                      Nov 18 at 12:17


















                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f567945%2fmodifying-windows-registry-from-within-linux%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Plaza Victoria

                      In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                      How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...