Windows 10: A REGISTRY mystery - reg file doesn't import properly

Discus and support A REGISTRY mystery - reg file doesn't import properly in Windows 10 Support to solve the problem; I have used reg, Kyhi has fixed, and all entries imported just fine. Try to use bat instead. Discussion in 'Windows 10 Support' started by ruggb, Feb 15, 2017.

  1. A REGISTRY mystery - reg file doesn't import properly


    I have used reg, Kyhi has fixed, and all entries imported just fine. Try to use bat instead.
     
    TairikuOkami, Feb 17, 2017
    #16
  2. Kyhi Win User

    Attachment 121731 here is your corrected reg file..

    I believe he had WORDWRAP enabled in notepad

    or now after reading the ( last page )which I failed to read..
    It may of been the program he used did not like spaces / or semi-colons

    Just a little FYI:
    Qoutes " " are wrapped around commands that have spaces...
    Otherwise the command breaks at the space..

    Example
    Cmd C:\New Folder > is seen as C:\New
    Cmd "C:\New Folder" > is seen a C:\New Folder

    Thus the give away hint in the first post = quotes all over the place
    Thus being read as several single lines of unknown code
    rather than a single line of code
     
  3. ruggb Win User
    @Kyhi
    thx, but if I export the key with regedit, delete the key in the registry, then clk the .reg file and import it, I have changed nothing in the .reg file that regedit (a MS program) created. Based on what I saw in notepad previously, I figured there was a problem with those lines, but MS created them, so who am I to question MS...........
    So this obviously is a newly created bug from GOD MS, since sometime in the past it worked fine.
     
    ruggb, Feb 17, 2017
    #18
  4. Kyhi Win User

    A REGISTRY mystery - reg file doesn't import properly

    it's fixed now in the reg file...
    Enjoy!!
     
  5. ruggb Win User
    well, this issue isn't resolved and the link to the "fixed" file doesn't work.
    The registry names that do not import contain CR CR LF at the end of each line in the value
    The value in the program that created the entry looks like this

    G1 Z5 ; lower bed
    G1 X50 Y260 f5000 ; move to back left
    G28 Z0 ; test Z0

    That is one value for a script name with CRs & LFs

    The reg file contains this:

    A REGISTRY mystery - reg file doesn't import properly [​IMG]


    So the 0d 00 0d 00 0a 00 is terminating the " and since that makes it invalid the entry is dropped on import.
    So how does the program create it in the first place?
    and just eliminating those CR LF is not going to recreate what is in the program.
     
    ruggb, Feb 22, 2017
    #20
  6. Berton Win User
    Just to commiserate a bit, I was 'taught' early in my computing days to never use a word processor program such as Word, Wordpad, WordPerfect, WordPro, etc., to edit such files as the Registry or for programming such as .exe files as there's always hidden coding in the documents but to always use a Text Editor such as Notepad. I haven't tried yet with Notepad++.
     
    Berton, Feb 22, 2017
    #21
  7. I think the question is, what is software do you have registered to open reg?

    I have exported a long line, it exported cut by slashes, but it imports OK.
    In wordpad, it has added spaces, but even altered, it imports just fine.
    So it is most likely you have something messed up with reg classes.
     
    TairikuOkami, Feb 22, 2017
    #22
  8. ruggb Win User

    A REGISTRY mystery - reg file doesn't import properly

    @TairikuOkami thanks but you are not seeing the problem. What you have posted has nothing to do with the problem. Review my last post again. The program that created the registry entries in the first place is Repetier Host a 3D printer program. It recorded multiple printer commands separated by CR/CR/LF as a single value in the registry. Regedit appears to export them correctly as seen in the Ultraedit snapshot, but upon import is relying on a CR or LF or both to terminate the " thereby seeing an invalid entry and dropping it (without any warning by the way). The CR and LF in those entries are part of the entry (as shown in my post) and should be imported intact as one value. Regedit should rely on the next " to terminate it, but God knows what other issues that would create when the other " was actually missing.
    So how did Repetier manage to create these entries? And is there any possibility I can import them - It isn't going to happen with Regedit unless MS changes the way they handle CR/LF. If I change the data type then Repetier probably won't be able to read it.
     
    ruggb, Feb 22, 2017
    #23
  9. ruggb Win User
    Well, I long for the old INI files. They were easy to fix and modify. But the registry is "suppose" to be just one big INI file. Somehow, Repetier Host is manipulating the registry and making it work for them. BUT regedit can't handle its own creation.
    I don't know if what Repetier is doing is defined by MS as being non-conforming. If I knew that I would go back to Repetier to fix their product. But one of them is not right because a basic function (export/import) does not work. I venture to say that a registry backup and restore would not work either, but it may be implemented different than an export/import.
     
    ruggb, Apr 4, 2018
    #24
Thema:

A REGISTRY mystery - reg file doesn't import properly

Loading...
  1. A REGISTRY mystery - reg file doesn't import properly - Similar Threads - REGISTRY mystery reg

  2. Cannot import registry file for windows defender, getting error "cannot import file...

    in Windows 10 Gaming
    Cannot import registry file for windows defender, getting error "cannot import file...: Already tried granting permissions in regedit and taking ownership of the file + granting everyone permissions, also ran a "sfc /scannow" command to search for any corrupt files, but I get the exact same error....
  3. Cannot import registry file for windows defender, getting error "cannot import file...

    in Windows 10 BSOD Crashes and Debugging
    Cannot import registry file for windows defender, getting error "cannot import file...: Already tried granting permissions in regedit and taking ownership of the file + granting everyone permissions, also ran a "sfc /scannow" command to search for any corrupt files, but I get the exact same error....
  4. Mysterious Display registries

    in Windows 10 Customization
    Mysterious Display registries: What are these registeries used for? Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\EnergyEstimation\Display DisplayBacklightPowerFloor DisplayBacklightPowerGradient DisplayBacklightPowerQDenominator DisplayBacklightPowerQNumerator...
  5. Mysterious Registry

    in Windows 10 Customization
    Mysterious Registry: Greetengs everybody and happy holidays. Could you please explain to me purpose of this Registry Values Windows 10, I couldn't find anything about it on the web: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\EnergyEstimation\Display...
  6. REG Import

    in Windows 10 Support
    REG Import: Good afternoon, I am putting a Batch file together that involves exporting and importing the Registry. However, I have a question. I am only posting the relevant parts of the code instead of the whole code. To export the Registry I am using . . . Code: for %%a in (HKLM HKCU...
  7. Cannot import Registry File, Not all Data was successfully written to the Registry

    in Windows 10 News
    Cannot import Registry File, Not all Data was successfully written to the Registry: [ATTACH]Windows Registry allows any user to take backup and restore registry files. While the […] This article Cannot import Registry File, Not all Data was successfully written to the Registry first appeared on TheWindowsClub.com. read more...
  8. Modifying Registry with "reg" file

    in Windows 10 Support
    Modifying Registry with "reg" file: I exported a HKCU key and saved it as a reg file. I now want to import it to another HDD. Prior to doing this I noticed the properties list in the Receiving system: 1) Contains the same list of items BUT 2) Are in a different order than the exported file. What to confirm...
  9. Import reg file in a batch file

    in Windows 10 Support
    Import reg file in a batch file: Hi, i've a reg file to mod windows 10 that works properly, but if i import it in a batch file it doesn't work. this is the reg file i've called Windows10.reg Code: Windows Registry Editor Version 5.00...
  10. Cannot import .reg. Error opening the file.

    in Windows 10 Support
    Cannot import .reg. Error opening the file.: ...There may be a disk or file system error. Happens when double-clicking reg-file on the NAS-share, which is mapped as a network drive. User is a user with admin rights (membership of Administrators group), and it is the first and only user that was created while W10 was...