{"id":907,"date":"2009-06-29T12:01:13","date_gmt":"2009-06-29T06:31:13","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=907"},"modified":"2019-05-12T03:01:48","modified_gmt":"2019-05-12T03:01:48","slug":"disable-empty-recycle-bin-confirmation-windows","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/disable-empty-recycle-bin-confirmation-windows\/","title":{"rendered":"Empty the Recycle Bin Without the Confirmation Window Showing Up"},"content":{"rendered":"<p>When emptying the contents of your Recycle Bin, you&#8217;ll be asked for confirmation as below. Here is a registry edit to turn off the prompt in Windows 7, 8 and Windows 10, using NirCmd. This registry edit replaces the <b>Empty Recycle Bin<\/b> command in the right-click menu and the ribbon button action with NirCmd, so that the Recycle Bin can be emptied silently.<!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/06\/rbin-silent-empty.png\" alt=\"recycle bin delete confirmation prompt\" width=\"482\" height=\"111\" class=\"alignnone size-full wp-image-5705\" \/><\/p>\n<h2>Using NirCmd to Silently Empty the Recycle Bin<\/h2>\n<p>1. Download <a target=\"_blank\" href=\"http:\/\/www.nirsoft.net\/utils\/nircmd.html\" rel=\"noopener noreferrer\">NirCmd<\/a> from Nirsoft.<\/p>\n<p>2. Unzip and move <b>NirCmd.exe<\/b> to the C:\\Windows folder.<\/p>\n<p>3. Download <a href=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/06\/empty-bin-silent.zip\">empty-bin-silent.zip<\/a> and save to Desktop.<\/p>\n<p>4. Extract the files to a folder, and run the file <b>empty-bin-silent.reg<\/b>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/06\/w7-emptybin.png\" alt=\"Emply Recycle bin menu\" width=\"259\" height=\"209\" class=\"alignnone size-full wp-image-5707\" \/><\/p>\n<p>This replaces the Empty Recycle Bin command with <code>NirCmd.exe emptybin<\/code> command-line. Now, emptying the Recycle Bin from the right-click menu should not produce any prompts. There is also an undo REG file available inside the above zip archive. As mentioned above this edit works in Windows 10 as well.<\/p>\n<h4>Contents of the REG file<\/h4>\n<pre><code>Windows Registry Editor Version 5.00<br>\r\n[HKEY_CURRENT_USER\\Software\\Classes\\CLSID\\{645FF040-5081-101B-9F08-00AA002F954E}\\shell\\empty\\command]\r\n&quot;DelegateExecute&quot;=&quot;&quot;\r\n@=&quot;nircmd.exe emptybin&quot;<br>\r\n<\/code><\/pre>\n<h2>Windows 10 &#8211; Empty Recycle Bin Button in Explorer<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/06\/emptybin-ribbon.png\" alt=\"empty recycle bin - ribbon\" width=\"144\" height=\"154\" class=\"alignright size-full wp-image-3365\" \/><\/p>\n<p>The above edit doesn&#8217;t work if you&#8217;re using the Empty Recycle Bin button in the ribbon. To silently invoke NirCmd when you click the ribbon button, use the following registry edit. Assuming you&#8217;ve already downloaded <a target=\"_blank\" href=\"http:\/\/www.nirsoft.net\/utils\/nircmd.html\" rel=\"noopener noreferrer\">NirCmd<\/a> and extracted NirCmd.exe to your Windows directory, follow these steps.<\/p>\n<h3>Replace the Empty Recycle Bin Ribbon Command in Registry<\/h3>\n<p>1. Start Regedit.exe and go to the following branch:<\/p>\n<pre>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CommandStore\\shell\\Windows.RecycleBin.Empty\\command<\/pre>\n<p>2. Export the branch to a REG file.<\/p>\n<p>3. <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-take-ownership-of-registry-keys-and-assign-full-permissions\/\">Take ownership<\/a> of the registry branch, and assign yourself full access to it.<\/p>\n<p>4. Double-click <code>(default)<\/code> and set its value data as follows:<\/p>\n<pre>nircmd.exe emptybin<\/pre>\n<p>5. Rename <code>DelegateExecute<\/code> to <code>DelegateExecute.OLD<\/code><\/p>\n<p>6. Exit the Registry Editor.<\/p>\n<p>Now, every time you click the Empty Recycle Bin button in the ribbon, it will instantly clear the contents using NirCmd, without asking for any confirmation.<\/p>\n<h3>Using a Script (optional) : Automatically Close Recycle Bin After Emptying<\/h3>\n<p>In step 4 above, you can mention a custom Vbscript which runs additional tasks after clearing the Recycle Bin. For example, to close the Recycle Bin automatically after emptying the contents, you can write a script like this.<\/p>\n<pre><code>Set WshShell = CreateObject(\"Wscript.Shell\")\r\nWshShell.Run \"nircmd.exe emptybin\",, true\r\nWscript.Sleep 500\r\nWshShell.SendKeys \"^w\"\r\nSet WshShell = Nothing\r\n<\/code><\/pre>\n<p>The above script sends the Ctrl + w keystroke to close the Recycle Bin window, after emptying the contents. Save the script to your Windows directory and name it as <code>emptybin.vbs<\/code>. Then in Step 4 above, set the <code>(default)<\/code> value data as follows:<\/p>\n<pre>wscript.exe c:\\windows\\emptybin.vbs<\/pre>\n<p>That&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When emptying the contents of your Recycle Bin, you&#8217;ll be asked for confirmation as below. Here is a registry edit to turn off the prompt in Windows 7, 8 and Windows 10, using NirCmd. This registry edit replaces the Empty Recycle Bin command in the right-click menu and the ribbon button action with NirCmd, so &#8230; <a title=\"Empty the Recycle Bin Without the Confirmation Window Showing Up\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/disable-empty-recycle-bin-confirmation-windows\/\" aria-label=\"Read more about Empty the Recycle Bin Without the Confirmation Window Showing Up\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[335,441,480],"class_list":["post-907","post","type-post","status-publish","format-standard","hentry","category-windows","tag-nircmd","tag-registry","tag-scripts"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3922,"url":"https:\/\/www.winhelponline.com\/blog\/empty-recycle-bin-task-scheduler-powershell-clear-recyclebin-nircmd\/","url_meta":{"origin":907,"position":0},"title":"Empty Recycle Bin Automatically Using Task Scheduler or Storage Sense","author":"Ramesh","date":"August 31, 2016","format":false,"excerpt":"You can use it to clear the Recycle Bin at a specified time or regular intervals with Task Scheduler using a PowerShell command. Alternately, you can also use Storage Settings (a.k.a. Storage Sense) to clear the files from Recycle Bin that are older than a certain number of days. This\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"empty recycle bin - storage settings or storage sense","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/storage-settings-cleanup-enable.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/storage-settings-cleanup-enable.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/storage-settings-cleanup-enable.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/storage-settings-cleanup-enable.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1006,"url":"https:\/\/www.winhelponline.com\/blog\/nircmd-elevate-switch-useful-uses\/","url_meta":{"origin":907,"position":1},"title":"NirCmd Elevate Switch Added &#8211; Some Useful Uses","author":"Ramesh","date":"February 24, 2010","format":false,"excerpt":"We've covered the excellent multi-purpose command-line tool NirCmd from Nirsoft earlier. This post talks about the new command-line switches added in the current version of NirCmd. Earlier this month, I sent a NirCmd feature request to Nir Sofer, asking to include an \"elevate\" switch, which should launch an application elevated\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1075,"url":"https:\/\/www.winhelponline.com\/blog\/fix-recycle-bin-icon-not-refresh-custom-icons-windows-7\/","url_meta":{"origin":907,"position":2},"title":"[Fix] Recycle Bin Icon Does Not Refresh Correctly","author":"Ramesh","date":"August 29, 2009","format":false,"excerpt":"When you use a custom icon (.ico) file to customize the Recycle Bin Empty & Full icons manually or via a desktop theme, the Recycle Bin icon may not update or refresh correctly when emptying the Recycle Bin or when you add items to it. In some cases, the issue\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"recycle bin does not refresh","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/08\/w7-rbin-custicon-3.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4931,"url":"https:\/\/www.winhelponline.com\/blog\/restart-explorer-gracefully-shortcut-command\/","url_meta":{"origin":907,"position":3},"title":"How to Restart Explorer Cleanly Using Shortcut or Command-line","author":"Ramesh","date":"December 31, 2016","format":false,"excerpt":"When you make changes to the Windows registry using the Registry Editor, script or any other automation tool, you may have to logoff and login back for the changes to take effect. That's especially true if you're altering the UI element metrics or changing the shell namespace folder icons etc.\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"restart explorer gracefully","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/restart-explorer-gracefully.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/restart-explorer-gracefully.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/restart-explorer-gracefully.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":295,"url":"https:\/\/www.winhelponline.com\/blog\/create-shortcuts-to-eject-and-close-cddvd-drive\/","url_meta":{"origin":907,"position":4},"title":"Shortcuts to Eject and Close CD\/DVD Drive in Windows","author":"Ramesh","date":"May 23, 2008","format":false,"excerpt":"Windows already includes the Eject command in the context menu for optical drives. If you want to add the Close Tray option in the context menu for optical drives, then this article is for you. NirCmd is a small command-line tool that allows you to do some useful tasks without\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/openclosetray.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":890,"url":"https:\/\/www.winhelponline.com\/blog\/add-nircmd-speak-to-context-menu-text-files\/","url_meta":{"origin":907,"position":5},"title":"Fun Tip: Add &#8220;Speak&#8221; Option to the Context Menu for Text Files","author":"Ramesh","date":"April 8, 2009","format":false,"excerpt":"The amazing NirCmd utility now has a new \"speak\" command that allows you to easily cause your computer to speak the text that you wish. In this command, NirCmd uses the Speech library (SAPI) that is installed in Windows. Here is a fun tip on how to add the Speak\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/nircmd-speak.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=907"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/907\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}