Data Danger Posted February 10, 2007 Posted February 10, 2007 HI All :confused: I have got myself quite confused about manifest files and how to use and insert them into my VB.NET application. I have read lots about them but some of the information on the web is quite old. I want to do the right thing and send out a manifest file if thats what is required. I have tested my VB.NET programs on the Vista OS and without using a manifest file when I click on one of my programs that do require admin rights the UAC does appear as is should. My other program that does not require admin rights works with no prompt. Does this mean that a manifest file is been used somewhere in my application that I do not know about or has the code first been checked before loading and it has found that admin rights would be required? Could somebody please also give me some links to using manifests in my VB.NET application that are simple to understand or even step by step instructions. VS2005 SP1 VB.NET Programming Windows XP SP2 Regards -Paul Quote
Data Danger Posted February 17, 2007 Author Posted February 17, 2007 Surprised I'm very surprised that with all the knowledge on this site that nobody can answer this but thank you to those that read it. -Paul Quote
Administrators PlausiblyDamp Posted February 17, 2007 Administrators Posted February 17, 2007 (edited) http://msdn2.microsoft.com/en-us/security/aa480150.aspx gives a broad outline of what you need to do. Taken from that link is a sample minfest processorArchitecture="X86" name="IsUserAdmin" type="win32"/> Description of your application level="requireAdministrator" uiAccess="false"/> this should get you started on generating your own manifest. As an example for an executable called WindowsApplication1.exe you would create a file called WindowsApplication1.exe.manifest that would contain processorArchitecture="X86" name="WindowsApplication1" type="win32"/> Description of your application level="requireAdministrator" uiAccess="false"/> After building your application if the .exe and the .exe.manifest are in the same folder run the following command mt -nologo -manifest windowsApplication1.exe.manifest -outputresource:WindowsApplication1.exe;1 If you are building a dll rather than an exe replace the 1 at the end with a 2. Try running the app and you should get the prompt to elevate to admin, also in explorer you should see the icon overlay as well. Edited May 23, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.