Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run explorer.exe as Administrator user within Windows 7

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?

like image 658
user393014 Avatar asked Nov 28 '25 20:11

user393014


1 Answers

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!

like image 140
bittusarkar Avatar answered Dec 01 '25 11:12

bittusarkar