lil bit of .reg file help. cant figure out how to reset string


  1. Posts : 740
    Windows 10 x64 Pro
       #1

    lil bit of .reg file help. cant figure out how to reset string


    here's an example

    [HKEY_CLASSES_ROOT\.bash_auto_file]
    @="Bash Script"

    it adds the value "Bash Script" to the default value of the .bash_auto_file key.

    i'm trying to reset the default string to its natural state with (value not set)

    [HKEY_CLASSES_ROOT\.bash_auto_file]
    @=""

    results in the value of the default string being blank, not returned to its (value not set) state. I have to actually open the string with its already blank value, then hit ok and it then populates with (value not set)

    if it were any other key, i could just delete the key entirely - alas its not an option here. I'm preeetty new to making my own .reg files and even if as i assume, blank and (value not set) are functionally the same, id love a way to return it to its "not touched" state if possible.
      My Computer


  2. Posts : 989
    Microsoft Windows 10 Home
       #2

    To remove a value via a .reg file, use:

    Code:
    [HKEY_CLASSES_ROOT\.bash_auto_file]
    @=-
    In the registry editor, right-click on the value name & select 'Delete'

    To remove a key via a .reg file, preface the key name with a "-":
    Code:
    [-HKEY_CLASSES_ROOT\.bash_auto_file]
      My Computer


  3. Posts : 17,092
    Windows 10 Home x64 Version 22H2 Build 19045.4894
       #3

    Please would you post screen-snips of the Registry key in the state you want it
    1 set to
    2 reset to

    Please confirm that you have tried to create the .reg files you want by manually exporting the Key in both the states you want
    1 set
    2 reset
    and confirm what is not done correctly if you 'run' [well, merge actually] each of those as a means of achieving what you want. Again snips of the Registry Key will probably be the best way of explaining.

    Denis
      My Computer


  4. Posts : 740
    Windows 10 x64 Pro
    Thread Starter
       #4

    KeithM said:
    To remove a value via a .reg file, use:

    Code:
    [HKEY_CLASSES_ROOT\.bash_auto_file]
    @=-
    In the registry editor, right-click on the value name & select 'Delete'

    To remove a key via a .reg file, preface the key name with a "-":

    Code:
    [-HKEY_CLASSES_ROOT\.bash_auto_file]
    of course! this should do the trick /facepalm

    I was aware of the "-" removing the keys. However I was trying to edit the default strings value with "" when i believe upon removal it would just be recreated so thats likely my ticket out.

    thank you!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:31.
Find Us




Windows 10 Forums