Help Making A .Reg File Or .Bat File

Discussion in 'Scripting' started by uffbros, May 30, 2018.

  1. uffbros

    uffbros MDL Senior Member

    Aug 9, 2010
    447
    58
    10
    I want to create a file that will delete the following registry entry when I desire.
    Computer\HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify\IconStreams
    Can someone make one for me to accomplish this? Would it be a .bat file or a .reg file to do this? Thanks.
     
  2. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    Can be CMD or REG:
    CMD:
    Code:
    @echo off
    reg delete "HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify\IconStreams" /f
    exit
    
    REG:
    Code:
    Windows Registry Editor Version 5.00
    
    [-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify\IconStreams]
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    "Notification Area - Remove Past Icons from List" . If you have items in Past Items that are have long ago been removed from the system and want to remove them from the list.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. uffbros

    uffbros MDL Senior Member

    Aug 9, 2010
    447
    58
    10
    The CMD one you list..I know I copy this into notepad..but what do I save it as? .bat or .cmd?
     
  5. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    As you like. I tend to name them CMD so would use something like iconstreamsdelete.cmd.

    Make sure 'hide extensions for known file types' is disabled in Folder Options to not create file.cmd.txt.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. uffbros

    uffbros MDL Senior Member

    Aug 9, 2010
    447
    58
    10
    Them scripts don't remove the registry entry that I show path too. Can you take a look at the path and determine why?
     
  7. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    Did you run as admin via right-click?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. lewcass

    lewcass MDL Senior Member

    Mar 10, 2018
    429
    251
    10
    It worked for me using the Administrator account. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. uffbros

    uffbros MDL Senior Member

    Aug 9, 2010
    447
    58
    10
    Yes I did..Tried it on both..then end task on explorer...then open explorer again. If I go in and delete that entry named IconStreams..It works
     
  10. uffbros

    uffbros MDL Senior Member

    Aug 9, 2010
    447
    58
    10
    I am the administrator..If I have to do that I mize well just manually go in and do it as I do now??
     
  11. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    You may be administrator, but it doesn't mean the same, what the command "Run as administrator" means.
    Why You don't use for this for example CCleaner?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. uffbros

    uffbros MDL Senior Member

    Aug 9, 2010
    447
    58
    10
    CCleaner worked...Thanks