Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4552688
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:49:52+00:00 2026-05-21T16:49:52+00:00

I want to create a manifest file for my VB 6.0 program, so that

  • 0

I want to create a manifest file for my VB 6.0 program, so that when I launch my application, the OS should ask the user for administrator privilege.

I also want to know how it can be embedded in the application?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T16:49:53+00:00Added an answer on May 21, 2026 at 4:49 pm

    You don’t actually create the manifest file in VB. A Windows application manifest is a standard text document, formatted as XML. You can create it in Notepad and save it with the appropriate file name in your application’s directory (YourAppName.exe.manifest).

    Microsoft has more information available here: Application Manifests. It even includes a sample manifest that you can simply copy and paste into a blank text file to get started.

    The important thing, if you want your application to prompt the user for elevation, is to set the requestedExecutionLevel to requireAdministrator, rather than asInvoker. Specific information on using manifests with UAC is available here.

    So a full sample might look something like this:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
      <assemblyIdentity
         version="1.0.0.0"
         processorArchitecture="*"
         name="MyMagicalApplication"
         type="win32"
      /> 
      <description>Sample manifest for your super cool application</description> 
    
      <!-- Request version 6 of the common controls. -->
      <dependency>
        <dependentAssembly>
          <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="*"
            publicKeyToken="6595b64144ccf1df"
            language="*"
          />
        </dependentAssembly>
     </dependency>
    
      <!-- Identify the application security requirements. -->
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
          <requestedPrivileges>
            <requestedExecutionLevel
              level="requireAdministrator"
              uiAccess="false"
            />
          </requestedPrivileges>
        </security>
      </trustInfo>
    </assembly>
    

    The traditional way to embed a manifest into an executable is using the mt.exe utility, available as part of the Windows SDK.

    The VBAccelerator site also has some information about embedding manifests in a VB 6 application. Specifically, it says:

    There are two ways to provide the manifest: the simplest (but least elegant) way is to provide the manifest on disk for an executable. Let’s say your application is called TimeSlot.exe. Then if you save the manifest XML above as

    TimeSlot.exe.manifest
    

    in the same directory as the executable, TimeSlot.exe will automatically get the XP styles. VB5 and VB6 examples are provided. If you rename the .manifest file prior to running the app, you can switch off the XP styles.

    A more robust method is to compile the manifest as a resource in your application. To do this, the manifest must appear as resource type RT_MANIFEST (24) with id CREATEPROCESS_MANIFEST_RESOURCE_ID (1). For some bizarre reason, you must also ensure that the resulting XML file is an even multiple of 4 bytes long. So for example, if your file is actually 597 bytes you need to add padding spaces to make up the file size to 600 bytes before compiling. The Resource examples demonstrate how to create this resource file using a resource compiler script (.rc file) and RC.exe.

    But if you want to embed the manifest automatically when you build your application from the VB 6 IDE, you’re in for a little more difficulty. The VB 6 IDE doesn’t support post-build steps, so you can’t simply run mt.exe on the command line to do it for you. There are a couple of utilities I’ve seen around the web that claim to automatically embed manifests for you, but I believe most of these are older utilities that only handle requesting v6 of ComCtl32.dll. I’m not sure if they’re easily extensible to include the UAC permissions as well, but it’s worth a shot. Here are some links to check out:

    • http://vb6zone.blogspot.com/2010/07/make-my-manifest.html
    • http://sourceforge.net/projects/ummm/
    • http://www.vbforums.com/showthread.php?t=606736
    • http://www.vbforums.com/showthread.php?t=430886
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a Java application bundle for Mac without using Mac. According
I want to create a client side mail creator web page. I know the
I want to create a function that performs a function passed by parameter on
I want to create a simple http proxy server that does some very basic
I want to create my Rails application with MySQL, because I like it so
I want to create dynamic content based on this. I know it's somewhere, as
I want to change the location where my application looks for the app.config file.
I'm new to WPF, and created a 1st simplistic WPF application that I want
I want to create an enum-like set of strings in a way that will
I want to create a multi file uploder using HTML5 and PHP5. I don't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.