January 19, 200521 yr hithis is what i want to doA right context menu option to delete a folder ad next rebootthis is what i have sofare:[HKEY_CLASSES_ROOT\Directory\shell\delete]@="Delete bij volgende Start"[HKEY_CLASSES_ROOT\Directory\shell\delete\command]@="dell.bat \"1%\""the bat file:REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /V Cleanup /D "cmd.exe /C RD *.* /S /Q"in the bat file, if you use it this way i know i must specify a folder to delete itthe question:is there a command to use it on all folders, not just 1 question 2:the same option to delete a filethanks for reading this
January 19, 200521 yr soulin, more details please. sixpack, what I can tell is that %CD% refers to current directory, and %%1 refers to current file. Hoping that hint helps You can try making your .BAT based on that info. And what do you mean by "all folders" ? Do you mean to say all folders within that folder? If so, use recursive folder removal ("rd /?" for help).
January 19, 200521 yr Author @prathapmlwith all folders i meandelete a folder on the desktopand delete a folder in lets say windowsso delete the folder with every thing in itdo you have a example on how to use the %CD% and %%1have tryed every command i know and it still doesend work
January 20, 200521 yr .reg[HKEY_CLASSES_ROOT\Folder\Shell\Delete on Reboot\Command]@="Delfolder.cmd \"%1\"".cmdset Dir2Del=%1REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Currentversion\RunOnce /v DelOnNextReboot /d "cmd.exe /c RD /S /Q %Dir2Del%"havent tested it but i think it should work
January 20, 200521 yr Author well i guess i f***tup the registerymy option delete for folders is gone [the windows one]glad it's the test pcedit: fixed
January 20, 200521 yr i tested it too, i get "too many commandline parameters" or something like that, it cant figure it out, cuz the directory is set
January 20, 200521 yr Author suppose this will work, then you can only delete 1 folderthe code must be for multiepul foldersand must work to on filesmy guess is it cant be doneor there must be a dll someware that can do all thisbut give up, NEVER
January 20, 200521 yr Sorry for late response: about PFR, try to download tools like alter.exe or similar and look to registry changes they made...- U can add files to copy during boot sequention- U can add files to delete during boot sequention- U can delete all pending operation (but I dont recommend this)PFR is also used for installing hotfixes (e.g. only newest version of files will be copied).
January 21, 200521 yr This one works:DeleteFolderonReboot.regWindows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Folder\shell\Delete on reboot\command]@="delfolder.cmd \"%1\""Delfolder.cmd@echo offsetlocalset pathwithquotes=%1set originalpath=%pathwithquotes:~1,-1%REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Currentversion\RunOnce /v "Del %originalpath% OnNextReboot" /d "cmd.exe /c RD /S /Q \"%originalpath%\"" /fendlocalDelfolder goes into windir or system32.EDIT: Fixed this with faster code
January 21, 200521 yr Author This one works:Delfolderonnextrebootextension.regWindows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Folder\shell\Delete on reboot\command]@="CMD.exe /C start /B /wait /D\"%1\" delfolder.cmd"Delfolder.cmd@echo offCMDOW @ /HIDREG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Currentversion\RunOnce /v "Del %cd% OnNextReboot" /d "cmd.exe /c RD /S /Q \"%cd%\"" /fEXITDelfolder goes into windir or system32.BTW, why do you need this feature???i allway's have files/folders that are in useto mutch digging around in windows i guess i will test it when i get homethanks for the reply
January 21, 200521 yr Author reply, it's an reply well sorry. old dude herei know my english is bad, sorry for this
Create an account or sign in to comment