Sign in to follow this  
Followers 0
blurb

Can a running exe be replaced

9 posts in this topic

Hi,

I have a program i wrote in autoit currently running on a server.

I have 100 people using that exe continuously 24hrs a day.

From time to time i wish to update the exe with a new version (more features, less bugs)

I can not however over write the exe if any 1 person is using it due to file locking i guess.

So im up for suggestions on what i can do to include a way to force each user to exit

so i can update the exe when needed without having to contact every user. Some of which

may have left it running and not even be at work.

My ideas to date have been use a starter.exe to start my main-137.exe

It simply runs the latest version of my main exe it finds and so long as i named

my main exe with a higher number over a period of a day or so everyone should be running a new version.

So it doesn't force them to start again but does overtime get them on a new version.

I'am however after a faster method of updating a running exe.

This also brings me to another question of how can i tell who infact has it running.

Not really after a whole client server type of thing, just maybe a log flel that updates every few minutes.

As everyone is using the same exe from the server is there a live way of looking at who has a lock on it ?

cheers

shaun

Share this post


Link to post
Share on other sites



As everyone is using the same exe from the server is there a live way of looking at who has a lock on it ?

You can right click my computer and select manage. Once Computer Management windows open select Shared Folders then select Open Files. From here you can either select your script .exe file right click and select Disconnect Open file or right click anywhere inside the window and select Disconnect All Open Files. After you disconnect all the user you will be able to copy the new version.

This will also show you the user account of who is using the file.


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

You can right click my computer and select manage. Once Computer Management windows open select Shared Folders then select Open Files. From here you can either select your script .exe file right click and select Disconnect Open file or right click anywhere inside the window and select Disconnect All Open Files. After you disconnect all the user you will be able to copy the new version.

This will also show you the user account of who is using the file.

Unless Im missing something

Im guessing that this will only work if im actually using computer management on the server.

A server which i do not have that type of access on.

but thanks for the info

cheers

shaun

Share this post


Link to post
Share on other sites

Depending on the server that you are using...you should be able to

take the executable off line and deny access to it through any

web service . But, that is just a guess...or you could set it up to copy

itself to the user's computer into either the web browser's temp directory

or the computer's temp directory and script it to delete itself after a

restart or a certain set time.

You could also implement an update feature and have it restart itself

once the update is detected or copied to the user's computer.


"...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor"Mess with the best, die like the rest!!" -Hackers"This above all to thine own self be true." -William Shakespeare"Corruption is only as corrupted as the individual makes it out to be." -Mozart_ONLINECheck out this free 1 GB FTP website at DriveHQ.com. You can control the users and even publish a website for free!![s]Your-Start.com - A online website that you can customize to hold all you links, news information, and other website info.[/s]

Share this post


Link to post
Share on other sites

Depending on the server that you are using...you should be able to

take the executable off line and deny access to it through any

web service . But, that is just a guess...or you could set it up to copy

itself to the user's computer into either the web browser's temp directory

or the computer's temp directory and script it to delete itself after a

restart or a certain set time.

You could also implement an update feature and have it restart itself

once the update is detected or copied to the user's computer.

Sorry the server doesn't have webservice access and the exe can only be run from its current directory.

I wrote it so it can not be copied and run from anywhere else so that there aren't heaps of versions floating around.

Currently working with a starter.exe that checks a ini and calls main file based on what the ini tells it to run.

Will have to set a timer in the program to check for a new version every so often and warn clients to re start the application

thanks for the suggestions

Share this post


Link to post
Share on other sites

I don't honestly think that will work.

The reason why is because if you either create a new file with the

name in the same directory, you will be prompted that the file

already exists and you will have to change the name, again.

If you change the name of the .exe, depending on the script, the

computer (server), or the depending files, computers, or programs

would not function and then you might have to restart all of the

services and programs. Plus, on some servers and computers, if

you try to change the .exe's name, you will be prompted that

it can't be done. But, again, that depends on the system and

server as well and other variables.


"...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor"Mess with the best, die like the rest!!" -Hackers"This above all to thine own self be true." -William Shakespeare"Corruption is only as corrupted as the individual makes it out to be." -Mozart_ONLINECheck out this free 1 GB FTP website at DriveHQ.com. You can control the users and even publish a website for free!![s]Your-Start.com - A online website that you can customize to hold all you links, news information, and other website info.[/s]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0