m0zzie
November 25th, 2008, 05:08 PM
Hi all, I have a problem I'm trying to solve and I can't seem to find the answers I need by googling and searching MSDN.
I have an application of mine (just one .exe) running on a central server PC, which has a network share, allowing a few other networked PC's to access/use it.
I want to move/delete/rename that .exe on the server while it is in-use by the other PC's, however, I can't find a way to use MoveFile or DeleteFile to do so. I am aware that MOVEFILE_DELAY_UNTIL_REBOOT can be used with MoveFileEx, however this is not an option, as the sever PC can not be rebooted!
There is certainly a way to do it manually (removing the network share will allow me to do so), but I'm wondering how I can do it using code? I am also aware that depending what my application is doing, this may cause it to crash out due to it no longer being available. This isn't too much of an issue, as it will instantly be replaced by an updated version of the original .exe.
Any help is much, much appreciated!
I have an application of mine (just one .exe) running on a central server PC, which has a network share, allowing a few other networked PC's to access/use it.
I want to move/delete/rename that .exe on the server while it is in-use by the other PC's, however, I can't find a way to use MoveFile or DeleteFile to do so. I am aware that MOVEFILE_DELAY_UNTIL_REBOOT can be used with MoveFileEx, however this is not an option, as the sever PC can not be rebooted!
There is certainly a way to do it manually (removing the network share will allow me to do so), but I'm wondering how I can do it using code? I am also aware that depending what my application is doing, this may cause it to crash out due to it no longer being available. This isn't too much of an issue, as it will instantly be replaced by an updated version of the original .exe.
Any help is much, much appreciated!