I'm trying to run a script to move users page files from C: to D: (if they don't have enough space)
I've figured out how to do it by modifying HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles
It works fine - a new page file is created on D:
But, the old page file isn't removed from C: on reboot (although it works fine if I make the change manually). After reboot I can actually delete it though, so it's no still in use - just hasn't been removed.
Is there a way to make that happen?