Quote:
my question is i need to retrieve the current users whom are using the application now or at least need to know who are accessing the exe file now because when i needed to update something i must turnoff all the PCs to be able to replace the exe file by the updated one
Now you know why nobody does this. And, no, you don't have to "turn off" all the PC's using it. The users just need to close the application.
You can find out which accounts have the .EXE file locked by opening Server Manager on the server machine, opening Roles, File Services and clicking on Share and Storage Management. ON the right, you'll get an option for "Manage Open Files..." DO NOT CLOSE THE CONNECTIONS FROM HERE! You WILL crash the application on every workstation that has it open.