Results 1 to 10 of 10

Thread: [RESOLVED] Embed manifest into exe?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    190

    Resolved [RESOLVED] Embed manifest into exe?

    Is it possible to embed a manifest file into your project so when I compile it the manifest is also in the project? This is the code for the manifest (makes the program use xp style)

    Code:
    <?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="X86"
      name="Microsoft.VB6.VBnetStyles"
      type="win32"
    />
    <dependency>
      <dependentAssembly>
        <assemblyIdentity
          type="win32"
          name="Microsoft.Windows.Common-Controls"
          version="6.0.0.0"
          processorArchitecture="X86"
          publicKeyToken="6595b64144ccf1df"
          language="*"
        />
      </dependentAssembly>
    </dependency>
    </assembly>

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Embed manifest into exe?

    look here for on way...

    Use the XP Manifest File in your App

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    190

    Re: Embed manifest into exe?

    Thats not what I mean, I don't want to have to send the manifest with the exe.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Embed manifest into exe?


  5. #5
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Re: Embed manifest into exe?

    The easiest way is probably using Resource Hacker.

    Save the xml above to a text file.

    Add the follwing code to your form.

    vb Code:
    1. Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long
    2.  
    3. Private Sub Form_Initialize()
    4.     InitCommonControls
    5. End Sub
    Start Resource Hacker
    Open the executable.
    Go to 'Action' -> 'Add a new resource' and select the text file
    Add the following numbers: 24, 1, 1301 and click the 'Add Resource' button.
    Go to 'File' -> 'Save as...' and save it.
    Last edited by Chris001; Jun 26th, 2007 at 03:16 PM.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Posts
    190

    Re: Embed manifest into exe?

    Thanks

  7. #7
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: [RESOLVED] Embed manifest into exe?

    I'll give you an option to create the manifest file to a different folder and once you've exited your application, the manifest file is also deleted. You'll create your manifest file once you started your app. I dunno if it'll work.

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] Embed manifest into exe?

    iamme2007,

    So what do you mean? In that app you did not have to send the manifest file is was created at runtime. What exactly were you looking at????

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [RESOLVED] Embed manifest into exe?

    There is no need to create it at runtime - it can be simply be embedded into the executable itself, as described at the link I provided.

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] Embed manifest into exe?

    Hmmm... I was lead to believe that VB6 could not use the Manifest file as a resource in that manner because of the was VB6 handles resources, It could only be done in VB.Net. I will try it and see what happens.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width