Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
795 views
in Technique[技术] by (71.8m points)

windows - How can I add a manifest (for UAC support) to my VB.NET application?

How can I add and embed a manifest file in VB.NET, in order to add UAC support to my application?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In VB.NET 2010, go to Project → My Project → Application→ View Windows Settings.

You'll see the default manifest. From here, you can change it as you desire.

For example, in this case, to require UAC elevation when the application launches, change:

requestedExecutionLevel level="asInvoker" uiAccess="false"  

to

requestedExecutionLevel level="requireAdministrator" uiAccess="false"   

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...