I’m writing an app that allows you to script the buttons from a wiimote into actions on your PC. It currently supports all of the features of the main remote control, except for the speaker.
Now, I’m running in to trouble when I run it on Vista with UAC turned on.
Any time a UAC’d window has focus, my app fails to move the mouse successfully. For instance, when an installer is run, I have to navigate it with the keyboard.
-
Will running the app as administrator solve my problem?(At one point in time, I was able to successfully move the mouse over a UAC-password-entry box) -
How do I build a manifest that will tell windows to “run as administrator”? -
How do I embed this manifest into my app, if I’m strongly naming my assembly?
-
How do I sign my application with an Authenticode cert?
EDIT:
Ok, so after some more extensive research, I have found:
http://msdn.microsoft.com/en-us/library/bb756929.aspx
<requestedExecutionLevel
level="asInvoker|highestAvailable|requireAdministrator"
uiAccess="true|false"/>
However, the article says:
Applications with the uiAccess flag
set to true must be Authenticode
signed to start properly. In addition,
the application must reside in a
protected location in the file system.
\Program Files\ and \windows\system32\
are currently the two allowable
protected locations.
I have edited the question to reflect the new developments.
3: This depends on your development environment. If you cant find an option to embed a manifest, you can instead deploy it as an external manifest file alongside your .exe. For example, if your .exe is called MyProg.exe, place the manifest in a file called MyProg.exe.manifest
Notice that since Windows Server 2003 and later, any internal manifest is preferred over an external manifest.
There’s also the MT.exe tool.
4: See for example http://www.tech-pro.net/code-signing-for-developers.html