GS Studios & Fix Comp Support Site
September 06, 2010, 06:20:21 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Due to the large number of time wasters trying to sign up to spam the site we have blocked auton registration.

If you wish to register then you need to send an email to us with the following details.

1: Your prefered username.
2: Your email address
3: Your real address we tie this up with our customer records unless you are a customer you wont get access.
4: Your phone number we will vairify your aplication.

We apologise for this but it is for our customer security and safety.

The Support Team
 
   Home   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Run as Administrator  (Read 1093 times)
admin
Administrator
Member
*****
Offline Offline

Posts: 174



WWW
« on: May 23, 2007, 12:00:22 PM »

The different ways of elevating an application, i.e. to run it with Administrator privileges in Windows Vista. If you use Vista already, you have probably noticed these UAC (User Account Control) prompts. Every time you start an application requiring Administrator rights, UAC will bug you with this message: "Windows needs your permission to continue".

Only if you see this pop-up an app will use a user's full administrator access token. If you don't get this UAC prompt that means the application won't run with Administrator privileges even if you logged on as a user belonging to the Administrator group. Vista does this automatically for UAC compliant tools. However, with legacy applications Vista often fails to detect if Administrator privileges are required. Please, read my post about elevated applications in Windows Vista for more details. In those cases where Vista's detection mechanism fails, you have to make sure by yourself that an app will run with the required rights.

If you want to play with this elevation thing, you can create a batch file which copies a file to  C:\Windows. Only if you start this batch file as an elevated application will it be able to copy the file to its destination. So far I know eight ways to elevate an application that would run it with Administrator privileges:

1. Run as administrator
You can just right click on the tool and select "Run as administrator". This is not very convenient, if you have to do this with all administration tools you use daily.

2. CTRL+SHIFT+ENTER
Another way is to hit the Windows key, type in the name of the program, and then start it with CTRL+SHIFT+ENTER.

3. Marking the application with "Run this program as Administrator"
You can mark the tools needing Administrator privileges: Open file properties, go to Compatibility, and select the "Run this program as Administrator" check box.

5. Command Prompt
You can also start an applications at an elevated execution level from an elevated command prompt. In this case, the UAC pop-up doesn't even bug you.

6. Start the application from another elevated application
You can try this with the Windows Task Manager. Go to C:\Windows\System32 using the Windows Explorer and right click on taskmgr.exe. Select "Run as administrator". Since the Task Manager is now running as an elevated application, you can start any other app with Administrator rights with it. Click on "File" in the Menu and then select "New Task (Run…)"

7. Use Group Policy or the Windows Registry to mark applications
This option is useful if you want to mark applications with a requested execution level for the whole Windows Domain. For this you have to create a registry entry under

Code:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\<path_to_executable>


The value of this entry has to be RUNASADMIN. If you want to use Group Policy to mark one or multiple apps this way, you have to create your own ADMX file.

8. Manifest file
I've read on several sites that it is possible to automatically start an application at an elevated level, if there is a so-called manifest file in the same folder. I tried it with some legacy applications, but it didn't work. I didn't try too long, though. I suppose, this is not a feasible option for sys admins, anyway.

Unfortunately, most of the ways described here won't prevent these UAC pop-ups from getting on your nerves (Microsoft calls this "Secure Desktop Prompting").
Logged

GS Studios
Professional websites for the average person at realistic affordable prices. www.website.uk.net
www.gsstudios.co.uk
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!