Jump to content
Excelsior Forums
Sign in to follow this  
chriswim

rename executable at runtime?

Recommended Posts

hi all!

i've got a problem. on windows 2000 and xp it is possible to rename an exe-file while it is running. this does not work with exe files created with jet. i need this feature to automatically update the programme.

thank you in andvance.

Christoph Wimberger / Linz, Austria

Share this post


Link to post
Share on other sites

okay,

choose an exe file from your harddisk and start it. let's say notepad.exe. while notepad is running, you can rename the executable in windows explorer as well as by calling File.renameTo(File dest) in Java. No Special Windows API is used and it seems to work with every exe file on windows 2000 and newer.

but it doesn't work with my executable built with jet. windows explorer tells me that another user or programme is accessing this file and File.renameTo simply returns false.

:huh:

i hope i could make it more clear to you.

Christoph Wimberger / Linz, Austria

Share this post


Link to post
Share on other sites

Executables compiled by Excelsior JET have PE sections marked as "shareable", for exemple ". rdata" (constant data section.)

That's why the system does not allow renaming running executables.

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  

×