Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: Add "Delete on Reboot" to Right Click Menu

  1. #1

    Add "Delete on Reboot" to Right Click Menu

    Delete those pesky files, and folders that don't want to go.

    Open notepad, and copy/paste the text below. Save the file as whatever.reg
    Double clicking the whatever.reg file will add it to the registry, and give you the option to: "Delete on Reboot" when you right click a file or folder.


    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell\Delete on reboot\command]
    @="CMD /E:OFF /C REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Currentversion\\RunOnce /v \"Del %1 OnNextReboot\" /d ^\"cmd.exe /c DEL /F /Q \\\"%1\\\"\" /f\""
    
    [HKEY_CLASSES_ROOT\*\shell\Open]
    
    [HKEY_CLASSES_ROOT\Folder\shell\Delete on reboot\command]
    @="CMD /E:OFF /C REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Currentversion\\RunOnce /v \"Del %1 OnNextReboot\" /d ^\"cmd.exe /c RD /S /Q \\\"%1\\\"\" /f\""

    Should work with XP Home, Pro, and Win2K
    Backup your registry first!!!

    I found this online somewhere, but can't remember where.
    I wanted to give credit to the author, but can't find the original thread it was in.
    [edit] Found the thread it was in Here

    I've tried it here on XP Pro, and it works well.
    Last edited by Norm; 02-18-05 at 01:13 PM.

  2. #2
    NYC Newbie Slayer Prey521's Avatar
    Join Date
    Feb 2000
    Location
    Humble, Tx
    Posts
    35,157
    n/m


    Gonna try it now for my home PC, I have a similar app that does this now, but doesn't work very well, thanks for the linkage.
    Have your feelings been hurt by a random act of E-Thuggery? If so, call 1-800-Waaaaahmbulance, we're here 24 hrs a day, 7 days a week, to take your call, you could be due a large monetary settlement, don't delay, call now.

    "Please be careful prior to entering the world wide web, the internet is serious business"


  3. #3
    Senior Member Sid's Avatar
    Join Date
    Sep 2000
    Location
    Hell's Kitchen
    Posts
    5,175
    Great find there Norm. Thanks for the code

  4. #4
    This will take care of most pesky files or folders, but not all, in all cases.

    Since the file gets deleted 'after' a user logs on, it IS possible the file will already be "in use" by the system, or another process, and access is denied.

    Also, some pesky files are recreated by another process (usually, but not always, viral) and will reappear even if deleted.

    Good for most though.....

  5. #5
    Ft. Couch! morbidpete's Avatar
    Join Date
    Mar 2002
    Location
    W. Warwick RI
    Posts
    7,194
    thats a whole bunch norm..had 2 folders on ym hdd that were empty and wouldnt deleat no matter what....this took care of them..awsome!

  6. #6
    Moderator YeOldeStonecat's Avatar
    Join Date
    Jan 2001
    Location
    Somewhere along the shoreline in New England
    Posts
    50,424
    Heehee...oh the pranks that can be pulled with this one.
    MORNING WOOD Lumber Company
    Guinness for Strength!!!

  7. #7
    SG Stud ColdFusion's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, BC
    Posts
    3,561
    Sweet! Great find there norm!

  8. #8
    SG Enthusiast The Dude's Avatar
    Join Date
    Jan 2002
    Location
    CYQY
    Posts
    3,095
    Great find, Norm!

  9. #9
    NYC Newbie Slayer Prey521's Avatar
    Join Date
    Feb 2000
    Location
    Humble, Tx
    Posts
    35,157
    How do you UNDO an accidental Delete on Reboot?
    Have your feelings been hurt by a random act of E-Thuggery? If so, call 1-800-Waaaaahmbulance, we're here 24 hrs a day, 7 days a week, to take your call, you could be due a large monetary settlement, don't delay, call now.

    "Please be careful prior to entering the world wide web, the internet is serious business"


  10. #10
    SG Stud ColdFusion's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, BC
    Posts
    3,561
    In the registry browse to:
    HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Currentversion\\RunOnce

    and delete the entry that has something along the lines of Del <file> OnNextReboot\

    I dont think you are ... but if you are asking how to undelete after the file has already been deleted then im not sure. Probibaly need some sort of file recovery software.

  11. #11
    SG Enthusiast The Dude's Avatar
    Join Date
    Jan 2002
    Location
    CYQY
    Posts
    3,095
    Check the recycle bin to see if it ended up there.

  12. #12
    Elite Member ghost's Avatar
    Join Date
    Oct 1999
    Location
    Virginia
    Posts
    11,813
    Thanks Norm, a case just came up today where I may need such a tool.
    If it has tits or tires, it's going to give you problems.

  13. #13
    Heathen AMPLIFRIER's Avatar
    Join Date
    Jun 2001
    Location
    127.0.0.1
    Posts
    1,644
    NO DOUBT!!!!!

    that is such an awesome menu item to have!!!!!

    sweet

    AMP
    Gigabyte ga-7n400 pro nForce2 mobo, Athlon XP3200, thermalright slk900, 1 gig corsair pc3200 cas2, radeon 9800pro, SB Audigy 2 ZS
    case= yeong yang YY-B0221 server cube,550 watt Antec true power,1 wd raptor 74 gig,1 34gig raptor (page) 2 wd 120gig se's raid 1, 1 120gig se. WIN xp Pro, Dual display samsung syncmaster 1100df 21in(Primary) Samsung syncmaster 955df 19in (secondary)".

  14. #14
    The ghost in the machine striker8000's Avatar
    Join Date
    Mar 2004
    Location
    lost in time
    Posts
    883
    Quote Originally Posted by Prey521
    How do you UNDO an accidental Delete on Reboot?
    if it isn't in the recycle bin...file recovery software

    it should be a simple name change (to mark as deleted until the space is needed), and a simple search to relocate the file....google isn't showing anything interesting yet
    Last edited by striker8000; 03-17-05 at 04:05 PM.
    still folding away, haven't been on as much lately

  15. #15
    NYC Newbie Slayer Prey521's Avatar
    Join Date
    Feb 2000
    Location
    Humble, Tx
    Posts
    35,157
    Quote Originally Posted by striker8000
    if it isn't in the recycle bin...file recovery software
    Thx, ColdFusion answered it for me.
    Have your feelings been hurt by a random act of E-Thuggery? If so, call 1-800-Waaaaahmbulance, we're here 24 hrs a day, 7 days a week, to take your call, you could be due a large monetary settlement, don't delay, call now.

    "Please be careful prior to entering the world wide web, the internet is serious business"


  16. #16
    Mental Metal Minister Jamie_R's Avatar
    Join Date
    Feb 2000
    Location
    NC
    Posts
    10,555
    Thanks Norm
    .

    The only thing necessary for the triumph of evil is for good men to do nothing.

  17. #17
    I wanted to remove this thing. I added it to my pc, but I think it isn't working. I'm on vista home premium and it doesn't work. please help

  18. #18
    Regular Member Watch5869's Avatar
    Join Date
    Jul 2001
    Posts
    297
    Quote Originally Posted by Norm View Post
    Delete those pesky files, and folders that don't want to go.

    Open notepad, and copy/paste the text below. Save the file as whatever.reg
    Double clicking the whatever.reg file will add it to the registry, and give you the option to: "Delete on Reboot" when you right click a file or folder.


    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\*\shell\Delete on reboot\command]
    @="CMD /E:OFF /C REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Currentversion\\RunOnce /v \"Del %1 OnNextReboot\" /d ^\"cmd.exe /c DEL /F /Q \\\"%1\\\"\" /f\""
    
    [HKEY_CLASSES_ROOT\*\shell\Open]
    
    [HKEY_CLASSES_ROOT\Folder\shell\Delete on reboot\command]
    @="CMD /E:OFF /C REG ADD HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Currentversion\\RunOnce /v \"Del %1 OnNextReboot\" /d ^\"cmd.exe /c RD /S /Q \\\"%1\\\"\" /f\""

    Should work with XP Home, Pro, and Win2K
    Backup your registry first!!!

    I found this online somewhere, but can't remember where.
    I wanted to give credit to the author, but can't find the original thread it was in.
    [edit] Found the thread it was in Here

    I've tried it here on XP Pro, and it works well.

    I tried this but get an error message: "Cannot Import [Path] [filename] The specified file is not a registry script. You can only import binary registry files from within the registry editor"

    did I do something wrong?

  19. #19
    Certified SG Addict CableDude's Avatar
    Join Date
    Jun 2001
    Posts
    26,985
    Quote Originally Posted by Watch5869 View Post
    I tried this but get an error message: "Cannot Import [Path] [filename] The specified file is not a registry script. You can only import binary registry files from within the registry editor"

    did I do something wrong?
    What OS?

  20. #20
    Regular Member Watch5869's Avatar
    Join Date
    Jul 2001
    Posts
    297
    Quote Originally Posted by CableDude View Post
    What OS?
    Win XP Home

Similar Threads

  1. Outlook 2002 Backup
    By Tuz76 in forum Software Forum
    Replies: 2
    Last Post: 12-05-01, 09:27 AM
  2. Lobo Can You Help ME
    By Lee_Nover in forum Broadband Tweaks Help
    Replies: 49
    Last Post: 10-15-01, 08:02 PM
  3. Tweaking help please
    By DEVX2K in forum Broadband Tweaks Help
    Replies: 6
    Last Post: 10-14-01, 07:52 AM
  4. So Far this is what I have done
    By Batman in forum Broadband Tweaks Help
    Replies: 5
    Last Post: 10-13-01, 08:45 PM
  5. Cable Tweak Problems
    By DEVX2K in forum Broadband Tweaks Help
    Replies: 5
    Last Post: 10-13-01, 07:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •