we have an old application written in VB6 that always uses the path of the exe itself as variable to show the current folder inside of the app.
Of course, no source files are available.
Changing directory and then calling the exe does not work. So I was wondering if there is maybe something like a set variable that may overwrite the one the app is loading. Or maybe the user can subst it somehow and merge it together with another directory.
I am pretty sure the answer is no but I wanted to give it a try.
Thanks Stephan
This is not a fully-fleshed out suggestion e.g. with code etc., but might point you in a useful direction.
Could you call a .bat file (or some other script) as a wrapper for the EXE, which handles the working directory logic? Then use that wrapper in place of the EXE. It could pass along any command line arguments and make it seem to the original program that everything is expected.
Or alternately -- If you can't use a script file, make a new EXE which does the "wrapper" logic, use that in place of the original EXE, rename the original EXE, etc. This EXE could be coded in any language.