JeremysDad wrote:
Hey guys,
I have created a series of scripts about 30 people in our office and have just run into a problem my amateur programmers brain didn't prepare for
The scripts are all loaded in a shared drive with the AHK executable. In the morning, the users activate the main script via an icon on their quick launch bar and then access the scripts through a menu activated by the mouse wheel.
I want to upgrade to the latest version of AHK but of course when I try to do so, I get an error from Win2K that the file is in use.
Short of running around the office and trying to get everyone to log out for a few minutes, is there another approach?
I've searched the forums using "Delete + Open" with no success. Any help would be appreciated.
Gary
I do something similar to this at work. A good idea that I use in my scripts that are run globally is putting a simple line in the script near the beginning like
Code:
IfExist, Exit.txt
{
ExitApp
}
This way you can just create an empty Exit.txt file out there and it will close on all the PCs giving you enough time to update the executable and delete Exit.txt. Edit: You can also put a msgbox command or something in here saying that the program is being updated and to try again in a few minutes.
If you have administrative rights to the network then you should be able to use a command line tool such as psexec or pskill (pskill needs to be loaded in the users system32 folder I believe for Windows which you could copy there with a script that users run or using login script). With pskill you can close processes out on remote PCs. Also if you have access to the server, you can close out open files by right clicking My Computer, clicking Manage, Shared Folders, Open Files and close out all of the users from the file that way.
Hopefully one of these works for you.
