View previous topic :: View next topic |
Author |
Message |
ttrfanatic
Joined: 20 Jan 2012 Posts: 5
|
Posted: Sat Mar 03, 2012 10:50 pm Post subject: Windows 7 UAC |
|
|
Hi,
When I run my program using the .NET Encryptor, unless I right click it and "Run As Administrator", I am unable to save my project via my app. I have added an app.manifest to my project and if I run the application by itself (not through the bootstrapper) it works perfectly.
Is there a way to add an app.manifest to the bootstrap project. I tried to do this but end up getting an error when I run it. Ultimately, I am trying to get the app to run at a higher privilege so that the user does not have to start it by right clicking and hitting "Run As Administrator"
TIA |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Mar 04, 2012 4:01 am Post subject: |
|
|
You can add a manifest to the bootstrap project just like you would any other project. Note that if you add a manifest using the manifest tool after the executable has been signed this will invalidate the strong name signature of the executable. Since the .NET Encryptor validates this when loading will cause an error. The solution is to resign the bootstrap tool using the sign tool (sn.exe) after adding the manifest eg
Code: | sn.exe -Ra $(TargetPath) $(ProjectDir)MyStrongName.snk |
_________________ Infralution Support |
|
Back to top |
|
|
ttrfanatic
Joined: 20 Jan 2012 Posts: 5
|
Posted: Sun Mar 04, 2012 6:59 pm Post subject: |
|
|
Hi,
Thanks for the reply on this. As it turns out, my issue had nothing to do with the signing of application. I wanted to post this in response in case anyone else is running into the same situation.
The issue that I was encountering was after I added the app.manifest file to the boostrap project and ran the program I was getting the following dialog upon start up.
I did some research on this and found that this is indeed a UAC issue but the problem was that in my app.manifest the element "uiAccess" in the "requestedExecutionLevel" item was set to "true". If I set this to "false" then everything works as expected.
If anyone wants more specific information on this you can see this thread dealing with this specific issue:
http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/8f19b0ba-cb14-4081-8622-c3b3a6481e48/ |
|
Back to top |
|
|
|