Subscribe

Get the Network Administrators tool pack

Subscribe to our newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them.

Click Here to get your free tools

Recent Posts

Search

Archives

Elevate processes from the command prompt in Vista

by Steve Wiseman on September 21, 2007 · 0 comments

in Windows


.

One of the things I do all the time in XP, 2000, and 2003 is use the RunAs command. It comes in handy when you are running as a limited user, and need to fire up a process as an administrator.

Here is the typical command line sequence

c:> Runas /user:intelliadmin\administrator notepad.exe
Enter the password for intelliadmin\administrator: *********
Attempting to start notepad.exe for user intelliadmin\administrator

Then notepad launches under my administrator account, instead of the current user.

This works great under those operating systems. I can run as a limited user, and when I want I can launch a command line window, or any other program as an administrator.

Unfortunately it doesn’t work the same in Vista. Yes – the RunAs command works perfectly fine. But because of the way UAC works it does not give me full administrative access. Why? Because when I launch another process as an administrator it still needs to be elevated.

If you have not used Vista yet I will explain. All users by default (Even administrators) run as a limited user. When windows detects that you need a higher level of access you are prompted like this:

UAC Prompt Command Line

That way you know, and have a choice when an application has administrative access – even when running as an administrator. The problem is that this prompt will only show if the program is Vista aware, or Vista detects that it is needed. Sometimes it is impossible for Vista to detect this. Why? How could it possibly know that you want to launch notepad so you can edit a file within the windows directory?

It can’t – and I was looking for something that would let me tell Vista from the command line that I wanted to be prompted. Microsoft Technet has an excellent article, and a powertoy (at the top) that lets you do exactly that.

It is simple to use. Once downloaded you can call it like this:

UAC Prompt Elevate

Now I can easily elevate from the command line and get administrative access when I need it.

One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools

Related Articles:

Leave a Comment

Category Links - Windows Forum - Exchange Forum