How do I add a manifest to an executable using mt.exe?

后端 未结 3 1830
星月不相逢
星月不相逢 2020-12-02 13:25

I\'m trying to use mt.exe from the Windows SDK to add a manifest to an executable file that doesn\'t have one, using the following command line:

C:\\winsdk61         


        
3条回答
  •  情话喂你
    2020-12-02 14:06

    This worked for me for VS 2005:

    1. Create text file named after executable with extension manifest, and ensure it is located in the same path as your code files; i.e. Form1.cs, etc. For example, if your app name is UACTester.exe then your manifest file should be named UACTester.exe.manifest.
    2. Ensure the contents of the manifest is good. I use this one:
        
        
            
            
                
                    
                        
                    
                    
                        
                        
                    
                
            
            
                
                
            
        
    
    1. On your executable project, add the following post-build event:

      "$(DevEnvDir)..\Tools\Bin\mt.exe" -nologo -manifest "$(TargetPath).manifest" -outputresource:"$(TargetPath)"

    Hope this helps. Good luck! -Matt Esterak

提交回复
热议问题