Author Topic: How to "delete files on next reboot"  (Read 8906 times)

0 Members and 1 Guest are viewing this topic.

Offline whiggs

  • Full Member
  • ***
  • Join Date: Aug 2015
  • Posts: 103
  • Karma: 1
    • View Profile
How to "delete files on next reboot"
« on: October 30, 2016, 06:59:40 pm »
Hello all.  I am currently writing a script in which I need to delete some constantly in use files using a delete on reboot method.  I have looked into the "PendingFileRenameOperations" registry key, but have yet to find a good example of its use or if it can be used to delete directories and their sub-directories and files.  Can someone advise as to if this is possible?  Is there another way to accomplish the same thing?  Which method would be best to use? Any advice would be awesome.

Offline Boggin

  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jul 2014
  • Posts: 10182
  • Location: UK
  • Karma: 122
    • View Profile
Re: How to "delete files on next reboot"
« Reply #1 on: October 31, 2016, 01:27:23 am »
When I've gotten the error that a file can't be deleted because it is use, I usually boot up into Safe Mode where it wouldn't normally be in use and then find I can easily delete.

Offline whiggs

  • Full Member
  • ***
  • Join Date: Aug 2015
  • Posts: 103
  • Karma: 1
    • View Profile
Re: How to "delete files on next reboot"
« Reply #2 on: October 31, 2016, 04:22:52 am »
Boggin,
My Goal is to Script this process.  Trying to build a repair script.

Offline Boggin

  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jul 2014
  • Posts: 10182
  • Location: UK
  • Karma: 122
    • View Profile
Re: How to "delete files on next reboot"
« Reply #3 on: October 31, 2016, 07:59:26 am »
You asked if there was another way to accomplish the same thing - I gave you what I do, but can't help with the script.

I can direct you to another forum where guys play around with such things if you want to register on there and open a thread.

www.windowssecrets.com then click on the Lounge tab.