3

I have the Windows 7 operating system, and I have administrator user credentials stored (known in advance).

I know we can run a program or .exe using "Runas" verb and launch a process, but my question is specific to explorer.exe. I am trying to run "runas /user: "control.exe printers" it launches successfully after giving a password to the prompt, but when I am checking within TaskManager it is running under my regular user with which I have logged on.

I have noticed this is only with explorer.exe. Other programs are working fine as expected with runas.

What is the catch here with Windows 7? Or how do I run explorer.exe or control.exe with printers?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user393014
  • 445
  • 1
  • 8
  • 15
  • Your question is not very clear. What is the problem that you actually want to solve by running whatever as administrator? What means running "explorer.exe or control.exe with printers"? Anyway, your question is better suited for superuser where it certainly will be moved to. – Dirk Vollmar Jan 20 '11 at 22:20
  • http://superuser.com/ is where you meant to ask this – Ilya Saunkin Jan 20 '11 at 22:21

4 Answers4

9

Running explorer.exe as a user different from the one that is already logged in using "runas" command is disabled in Windows 7. But there is a workaround for this:

  1. Start -> Run -> regedit
  2. Navigate to the registry key: HKEY_CLASSES_ROOT\AppID{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}
  3. Right click on the registry key and click Permissions...
  4. Give Full Control permissions to the user logged in.
  5. Start -> Run -> dcomcnfg.exe -> Expand DCOM Config
  6. Right click and select properties of "Elevated-Unelevated Explorer Factory", click the Identity tab and select "The launching user"

After doing this explorer.exe will launch as the user specified in the RunAs.exe command!

denrad
  • 3
  • 3
bittusarkar
  • 6,247
  • 3
  • 30
  • 50
2

This one works for Windows 7, 8.0 and 8.1

  • Start Registry as an administrative user.
  • Navigate / find ID HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}
  • Take ownership of the node and assign full rights of the registry node.
  • Rename node RunAs to _RunAs.
  • Close Regedit.

Now go to C:\Windows\Explorer.exe and create a shortcut to desktop (use Send To).

Right click and run as Administrator. This should open Windows Explorer as a different user.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

Windows Explorer likes to open new windows in the same process as the shell aka taskbar.

You could try:

explorer.exe /separate,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}

This should open "Computer\ControlPanel\Printers" in a new process...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Anders
  • 97,548
  • 12
  • 110
  • 164
0

Try Below Code :

runas /user:DOMAIN\username "control /name Microsoft.DevicesAndPrinters”
LuFFy
  • 8,799
  • 10
  • 41
  • 59
Matty Brown
  • 404
  • 3
  • 16