Click here to Skip to main content
15,914,070 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Manifest File Configuration Pin
Dave Kreskowiak14-Oct-08 3:50
mveDave Kreskowiak14-Oct-08 3:50 
GeneralRe: Manifest File Configuration Pin
Mark Salsbery14-Oct-08 4:18
Mark Salsbery14-Oct-08 4:18 
GeneralRe: Manifest File Configuration Pin
Dave Kreskowiak14-Oct-08 7:15
mveDave Kreskowiak14-Oct-08 7:15 
GeneralRe: Manifest File Configuration Pin
Mark Salsbery14-Oct-08 7:20
Mark Salsbery14-Oct-08 7:20 
GeneralRe: Manifest File Configuration Pin
Pete O'Hanlon14-Oct-08 5:00
mvePete O'Hanlon14-Oct-08 5:00 
GeneralRe: Manifest File Configuration Pin
SNI15-Oct-08 0:52
SNI15-Oct-08 0:52 
GeneralRe: Manifest File Configuration Pin
Pete O'Hanlon15-Oct-08 2:14
mvePete O'Hanlon15-Oct-08 2:14 
GeneralRe: Manifest File Configuration [modified] Pin
Mark Salsbery14-Oct-08 7:55
Mark Salsbery14-Oct-08 7:55 
Ok, I fired up the old Visual Studio 2005 and created a new project.

I added a file to the project called MyAppName.exe.manifest
(MyAppName.exe MUST be the resulting EXE file name)

In that file I put the following XML:
<?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="Test1.exe" type="win32"/>
  <description>Description of your application</description>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='requireAdministrator' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

Note that your dependeny section may be different - create a simple project
(of type similar to yours - Win32, MFC, whatever) with the wizard, build it,
and examine the created .intermediate.manifest file to get the dependencies.

In the project properties/Linker/Manifest File I set Generate Manifest to no

*edit* this step isn't necessary
In the project properties/Build Events/Post-build Event I added the following
command line:
“$(FrameworkSDKDir).\Bin\mt.exe” -nologo -manifest “$(ProjectDir)$(TargetFileName).manifest” -outputresource:”$(TargetPath);#1″


Built the project - no warnings no errors.

Ran the exe from debugger - got the "requires elevation" error.
Ran the exe from Windows Explorer - got the UAC prompt.

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

modified on Tuesday, October 14, 2008 2:21 PM

GeneralRe: Manifest File Configuration Pin
SNI16-Oct-08 21:06
SNI16-Oct-08 21:06 
QuestionResourceManager class Pin
dmartu12-Oct-08 12:54
dmartu12-Oct-08 12:54 
AnswerRe: ResourceManager class Pin
Dave Kreskowiak14-Oct-08 3:49
mveDave Kreskowiak14-Oct-08 3:49 
QuestionSimple MouseEnter MouseLeave Events Pin
MarkMokris11-Oct-08 4:50
MarkMokris11-Oct-08 4:50 
AnswerRe: Simple MouseEnter MouseLeave Events Pin
Wendelius12-Oct-08 1:03
mentorWendelius12-Oct-08 1:03 
QuestionSpring ToolStrip Pin
Grant Nelson10-Oct-08 21:32
Grant Nelson10-Oct-08 21:32 
AnswerRe: Spring ToolStrip Pin
Thomas Stockwell15-Oct-08 2:09
professionalThomas Stockwell15-Oct-08 2:09 
QuestionFileSystemWatcher Pin
Ebube8-Oct-08 5:14
Ebube8-Oct-08 5:14 
AnswerRe: FileSystemWatcher Pin
Giorgi Dalakishvili8-Oct-08 7:16
mentorGiorgi Dalakishvili8-Oct-08 7:16 
AnswerRe: FileSystemWatcher Pin
Mark Salsbery8-Oct-08 7:26
Mark Salsbery8-Oct-08 7:26 
GeneralRe: FileSystemWatcher Pin
led mike8-Oct-08 10:30
led mike8-Oct-08 10:30 
QuestionVB.NET thisconnection.open and application shutsdown Pin
lmnorms18-Oct-08 4:37
lmnorms18-Oct-08 4:37 
AnswerRe: VB.NET thisconnection.open and application shutsdown Pin
led mike8-Oct-08 4:49
led mike8-Oct-08 4:49 
GeneralRe: VB.NET thisconnection.open and application shutsdown Pin
lmnorms18-Oct-08 10:21
lmnorms18-Oct-08 10:21 
QuestionGetting Socket Exception when using RAS and TCP client both Pin
kaushik_Manoj8-Oct-08 3:21
kaushik_Manoj8-Oct-08 3:21 
AnswerRe: Getting Socket Exception when using RAS and TCP client both Pin
led mike8-Oct-08 4:45
led mike8-Oct-08 4:45 
Questiongeting data from excel Pin
ajayjerone8-Oct-08 2:43
ajayjerone8-Oct-08 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.