WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

UAC Prompt Vista/Win7, need program to prompt for admin rights

ChillyWilly
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 91
Member No.: 5730
Joined: 5-January 08


My program needs to run as administrator to load a registry hive. instead of asking the user to right click and choose "run as administrator" how would i prompt automatically? blink.gif



i was reading somewhere that if i put this in my manifest.xml
it should prompt
CODE
<!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
   <security>
     <requestedPrivileges>
       <requestedExecutionLevel
         level="requireAdministrator"
         uiAccess="false"/>
     </requestedPrivileges>
   </security>
 </trustInfo>

PMEmail Poster
Top
ChillyWilly
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 91
Member No.: 5730
Joined: 5-January 08


I tried adding a manifest.xml but it didnt work i basically took the xp themes manifest found on the forum and added the lines i posted in the code above.

i also read the the ID has to be 1

but when i try to make it 1 it wont compile
1 24 DISCARDABLE "manifest.xml"

i get "Execution Failed!" when i compile it

the code now prompts on vista but now it wont run on XP because its looking for the
requireAdministrator
PMEmail Poster
Top
Jupiter
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 732
Member No.: 773
Joined: 10-November 04


use full manifest instead of only UAC one
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google