Hi,
In a corporate environment, I need to regularly update an application exe file that's stored in its folder under C:\Program Files\<appfolder>.
I know that when an app writes to, e.g., an ini file, the ini file is virtualised in the user's VirtualStore\Program Files\<appfolder> . However, what if I want to update the application exe file? I need some kind of cheat in order to do this via the user's login.
Updating the exe in its normal location, via Admin privs, is not an option, as users' PCs are heavily locked down and I can't get Admin privs. Under Win2K, I could easily update the exe by using a .bat file I sent to the user, which would just overwrite the old exe in its folder (as the user had modify privs to the app's folder). This is now not possible under Vista (thanks MS! I know you're trying to teach us 'best practice' here, but please don't ram it down my throat like this - the real world ain't black & white, anarchy is sometimes necessary).
Having a separate 'Vistafied' version of the app is not an option for me either, for now at least (please don't ask why - it's a very long answer!).
So, I thought maybe the following 'cheat' would work, though I'm not in a position to try it for myself just yet, as that would be lots of hassle to get done (another long story, as is everything in this environment - don't ask!), so would like to know beforehand whether it stands a chance.
My proposed 'cheat' is:-
1) A 'loader' app is launched by the user, which attempts to increment (or whatever) a dummy (unused) byte in the main app exe file (in C:\Program Files\<appfolder> , but effectively modifies the virtualised copy instead), then in turn launches that (virtualised) main app.
2) (this step only when an update is needed) I send the user a batch (.bat) file, which, while the app isn't running of course, copies the new main app exe file into the VirtualStore, overwriting the one already in there.
3) Back round to step 1. Each time the loader app is run, the main app exe is read from, and effectively written back to, the VirtualStore.... and so on....
Would/should this approach work? Or am I missing something? Thinks maybe I've confused myself here?
Your thoughts & comments would be most appreciated.
Thanks for reading, and any help you might give.
Bookmarks