@Switchtense
That could be a way.
But instead of updating from an empty folder it could be faster to copy the current module that require privileges to write on local or temp directory.
But having to coping manually is a bit rudimentary.
There is also possibility to launch the updater from your GUI as administrator.
- Check if Warband path is writable
- If not writable launch crpg_update as administrator
This should prompt privileges after clicking on "Update", except if compiler add privileges requirement for the whole app.
Is your script now able to create the cRPG folder?
Cause currently the GUI needs admin rights to do so. (If the Warband folder is inside the programs-folder)
Your update does not need admin rights at all.
My problem at the moment is that I can tell whether the application is run as an admin, but it is difficult to check whether, as a standard user, it is possible to write into the Warband folder, without throwing an UnauthorizedAccessException (Or whichever is used when trying to do something you need admin for)
I cannto seem to find a reliable method which lets you know whether you need admin for whatever you are about to do.
I could only check what folder the user selected, if it contains "programs" I can ask for an alternative path. But that is even more quick & dirty than it already is. A lot more than I'd like.
If the app is being run as an admin, I can just proceed whatever happens, but the case of being a standard user is giving me a headache.