Help Making A .Reg File Or .Bat File

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

  1. uffbros

    uffbros MDL Senior Member

    Joined:
    Aug 9, 2010
    Messages:
    384
    Likes Received:
    35
    Trophy Points:
    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

    Joined:
    Aug 15, 2012
    Messages:
    16,130
    Likes Received:
    24,279
    Trophy Points:
    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]
    
     
  3. lewcass

    lewcass MDL Senior Member

    Joined:
    Mar 10, 2018
    Messages:
    429
    Likes Received:
    250
    Trophy Points:
    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.
     
  4. uffbros

    uffbros MDL Senior Member

    Joined:
    Aug 9, 2010
    Messages:
    384
    Likes Received:
    35
    Trophy Points:
    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

    Joined:
    Aug 15, 2012
    Messages:
    16,130
    Likes Received:
    24,279
    Trophy Points:
    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.
     
  6. uffbros

    uffbros MDL Senior Member

    Joined:
    Aug 9, 2010
    Messages:
    384
    Likes Received:
    35
    Trophy Points:
    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

    Joined:
    Aug 15, 2012
    Messages:
    16,130
    Likes Received:
    24,279
    Trophy Points:
    340
    Did you run as admin via right-click?
     
  8. lewcass

    lewcass MDL Senior Member

    Joined:
    Mar 10, 2018
    Messages:
    429
    Likes Received:
    250
    Trophy Points:
    10
    It worked for me using the Administrator account. :)
     
  9. uffbros

    uffbros MDL Senior Member

    Joined:
    Aug 9, 2010
    Messages:
    384
    Likes Received:
    35
    Trophy Points:
    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

    Joined:
    Aug 9, 2010
    Messages:
    384
    Likes Received:
    35
    Trophy Points:
    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

    Joined:
    Nov 26, 2012
    Messages:
    2,436
    Likes Received:
    883
    Trophy Points:
    90
    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?
     
  12. uffbros

    uffbros MDL Senior Member

    Joined:
    Aug 9, 2010
    Messages:
    384
    Likes Received:
    35
    Trophy Points:
    10
    CCleaner worked...Thanks