How do you include comments in .reg files?

Discussion in 'Windows Desktop Systems' started by LoctOut, Sep 18, 2002.

  1. LoctOut

    LoctOut Guest

    With so many registry tweaks around, I sometimes lose track of what some of my .reg file tweaks are supposed to do or undo.

    I was wondering how you can include a comment that reminds the user what the .reg file does, kinda like we used to do using "REM" statements?

    You could even make up new .reg files and include the original values as coments, so you have old and new in one file.
     
  2. yoyo

    yoyo _________________

    Messages:
    1,557
    To include comments in a registry file, place a
    semicolon (;) at the beginning of the line, as shown below:



    ; This will delete the key below because of the - sign
    [-HKEY_LOCAL_MACHINE\SOFTWARE\SavillTech\key]
     
  3. LoctOut

    LoctOut Guest

    thanks yoyo

    so if this is my .reg file.........

    REGEDIT5

    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
    "Anchor Underline"="yes"
    "Cache_Update_Frequency"="Once_Per_Session"
    "Display Inline Images"="yes"
    "Do404Search"=hex:01,00,00,00
    "Local Page"="C:\\WINDOWS\\SYSTEM\\blank.htm"


    and I want to add the comment "This key does nothing" I would do it like this......?


    ;This key does nothing
    ;
    REGEDIT5

    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
    "Anchor Underline"="yes"
    "Cache_Update_Frequency"="Once_Per_Session"
    "Display Inline Images"="yes"
    "Do404Search"=hex:01,00,00,00
    "Local Page"="C:\\WINDOWS\\SYSTEM\\blank.htm"
     
  4. yoyo

    yoyo _________________

    Messages:
    1,557
    Would try it this way:

    Windows Registry Editor Version 5.00

    ; This key does nothing
    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
    "Anchor Underline"="yes"
    "Cache_Update_Frequency"="Once_Per_Session"
    "Display Inline Images"="yes"
    "Do404Search"=hex:01,00,00,00
    "Local Page"="C:\\WINDOWS\\SYSTEM\\blank.htm"
     
  5. Well... I would rather keep all my reg files clean and create a text file and folder for each reg edits. That way, I can see the text without having to look in reg files.

    This way, I keep it all organised! :)
     
  6. terrypin

    terrypin Guest

    thanks for that yoyo, learn something new everyday :)
     
  7. Stircrazy

    Stircrazy Guest

    or you could just name the reg file something that you will know what it does lol
    maybe as Jason Said write a txt file with filenames/disc incase you forget