renameLockedFileInDirectoryPath()

Renames a file that is currently in use that is located in the path returned from a getDirectoryPathFromRegistry() command. The file is renamed the next time the system is rebooted. Can be used to delete a file that is currently in use if the "new file name" is left blank. The file is deleted when the system is rebooted.

Example

getDirectoryPathFromRegistry("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Dell\ClientSystemUpdate\InstallPath", "All Operating Systems", "Halt on Fail")
renameLockedFileInDirectoryPath("core.dll", "core.dll", "All Operating Systems", "Halt on Fail")