Opening Explorer shell with admin privileges on XP (with IE7 installed)

I always use the following command to launch a separate explorer shell on XP/IE7. Looks like /separate switch is undocumented (haven't seen it much on the web till recently).

Use this syntax in "Target" of an Explorer.exe shortcut:

runas /user:ComputerName\AdminName "C:\WINDOWS\explorer.exe /separate"
  • Replace ComputerName with yours (may be your Domain), ditto AdminName. Remember, all this above goes in the "Target" field of a Shortcut to C:\Windows\explorer.exe
  • Enter the Admin password in the Pop-up Command Prompt and you should see the separate explorer shell (running under the administrator account)

If you change the Toolbar Background of Explorer while logged in as the Admin using gpedit.msc (for XP Pro), when you start a RunAs Admin Explorer instance from the User session, you will see the unique background... and KNOW you're running Admin Explorer (instructions here).

My example tested on XP x64 with IE7 works great:
Here are vertical stripes on my Admin Explorer

~Sef.


In Windows XP, you can run Windows Explorer as any other user, including "Administrator", by following the "Option 2" instructions on Aaron Margosis's blog post entitled RunAs with Explorer: http://blogs.msdn.com/aaron_margosis/archive/2004/07/07/175488.aspx.

In short:

  1. Log onto the machine as the user that you eventually want to RunAs.
  2. Navigate to the Folder Options control panel, and check the option "Launch folder windows in a separate process".

I use this all the time, and so I have included the following *.cmd script in my new machine build process:

rem Tested on Windows XP only!
reg load "HKU\TempDefaultProfileHive" "%ALLUSERSPROFILE%\..\Default User\ntuser.dat"
reg add "HKU\TempDefaultProfileHive\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SeparateProcess" /t REG_DWORD /d 1 /f
reg unload "HKU\TempDefaultProfileHive"

This script turns on the "Launch folder windows in a separate process" setting for all new profiles that are created based on the machine's default user profile.


You can use runas.exe to run a program (for instance a windows console) under different credentials. I have a shortcut on my desktop called 'su' that links to this:

%windir%\system32\runas.exe /noprofile /user:administrator cmd

This will start a console box asking for the administrator password.


@Huppie - runas is great, but launching explorer doesn't seem to work. I can run cmd just fine, or my AD console, but explorer just fails without throwing any sort of error.

Windows Explorer is (sadly) a bit too integrated with windows, it cannot be opened with runas... try using a different file browser (for instance Total Commander).


Gulzar has an (undocumented) solution to run explorer with runas:

%windir%\system32\runas.exe /user:administrator "explorer.exe /separate"