Executable file not working the same

In previous versions of our auto updates, we included an exe file that we execute at the end of the update that processes changes to the access database with some user interaction. This has been working just fine.

We are now releasing a new version that uses sql server express as the database. I have updated the exe code to work with sql server instead. If I run this code as part of an installation upgrade it works just fine. But if I run it from within the auto updater I get permissions errors (access denied) on the database files. I can't seem to figure out why it would be different when accessing the sql server db from within the autoupdater or from the installer.

Have you heard of this sort of thing before? I have tried the elevate command and that does not seem to help. I also removed the exe from the updater so the new database files get copied then running the exe manually. It does not work that way either. I assume it has something to do with permissions. I have tried running code that will change the file permissions, but that too does not seem to work.

Any ideas what I may be doing wrong?

If a file is in use then you'll get an access denied error. Or if wyUpdate isn't elevated and the file you're trying to replace needs admin permissions, then you'll also get an access denied error.

I'll be able to give you a better answer if you give me more information. Is the file in-use? What error are you getting? Is your installer doing something different than wyUpdate (my guess: it is -- namely, shutting down a process or service that's using the file).

After much digging it was a permissions issue that when the windows installer runs it somehow has the proper permissions set for the file but running it through the updater it did not. Once I added code to set the permissions on the sql server file and ran the executable as elevated it now works.

Thanks for the advice!