service - Renaming A Running Process' File Image On Windows -


I have a Windows service application on Vista SP1 and I have found that users are changing the name of their executable file (when it is running)

I remember that with older versions of Windows you have to 'do this, because the OS kept the lock on the file. Even with Vista SP1, I still can not duplicate the existing file when it is running - Windows reports show that the file is in use - if it is prudent then why should I be allowed to rename it ? What happens if windows need a page in the new code page from XE, but the file has been renamed because it was started? I was running the processor monitor, while the name of the exe file etc. was changing, but Proc Som did not report anything weird and logged in by changing the file name like any other file.

Does anyone know what is happening behind the scenes? It appears that the windows running process will allow the filename (or dependent DLL) to be changed. What am I missing here?

Your concept is incorrect ... File name is not centered File- Io universe ... open The file is handled when you rename the file, then the file is not moved to separate section, it is still in the same place and the internal data structure for the open file of the disk is still in the same place The bottom line is pointing out that your comments are correct. You can rename an ongoing program without problems, you can create a new file with the same name as a running program, it's really useful behavior if you want to update software while running the software.


Comments