Setting Shortcut property "Run with different credentials" in setup project
I have WPF application (VS2008). In the setup project I create a shortcut for the application.
When the user clicks on the shortcut the application starts. What I need is for the application to always ask for the user credentials before running.
I can Shift+right click on the short cut and set the advanced property "Run with different credentials". But the It needs to be done one every开发者_开发百科 machine that the application is installed.
Is there any way I can set this property for the shortcut in the setup project itself?
Thanks in advance.
Shaili
From my knowledge there isn't a way of setting the "Run As Administrator" flag dynamically for a shortcut, it can only be set manually through the shortcut properties.
The recommended approach is to use an application manifest which tells Windows how to run your application. You can read more here: http://msdn.microsoft.com/en-us/library/bb756929.aspx
精彩评论