I ran into this quite often stated problem but even after looking up nearly every scource I didn’t get an aswer. Problem is as follows:
I wrote a little updater tool that connects to a server to check for new versions of an application and then copies the new version to the clientmashine. So the pattern is as follows:
Client installs the updater which is pre configured by me with a specific application. So basicly the updater is somewhere in the Program Files Folder. Then the updater is started, connects to our server and gets the newest version and installs it to the very same dir as the updater is installed. So the client doesn’t know there are two applications. the updater and the main application the updater is for. I hope you get the idea.
So this is why I need access to the Program Files folder.
I am developing under windows 7 and the software is to run on 7 as well.
Is there a way to make sure the updater is run by administrator. Do I need admin rights to access it? What else since it denies access even if I do have admin rights? Is there a way to check in code what rights a user has?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…