Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I used to demote my user account so that it had no admin priveleges and used a 'sudo-like' trick where you create a shortcut to IE6 and enabled the 'Run with different credentials' option to open a shell window as local admin so I could install and uninstall things, etc.

When I upgraded to IE7 this stopped working - IE7 launches Windows Explorer separately.

I've tried running Windows Explorer with different credentials but this does not work.

Does anyone know how to re-enable this behaviour so that I don't have to run my computer on a daily basis with administrator privileges?

share|improve this question

migrated from stackoverflow.com Aug 25 '11 at 12:52

This question came from our site for professional and enthusiast programmers.

add comment

10 Answers 10

up vote 32 down vote accepted

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 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: http://tweaks.com/windows/36795/change-browser-toolbar-background/ My Example: Here are vertical stripes on my Admin Explorer I have tested this on XP x64 with IE7 and it works great.

~Sef.

share|improve this answer
1  
Would be really great to have a way of knowing the owner of an explorer window (at the title bar, status bar or something like that). Do you know if this is possible? –  SoMoS Jan 19 '10 at 7:32
    
@SoMoS: This would indeed be great. –  SamB Apr 17 '10 at 18:25
add comment

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.

share|improve this answer
    
This is good to know although I chose the accepted answer since it is a one stage process. Thanks! –  Brendan Oct 5 '08 at 13:08
add comment

All the pieces to the puzzle have been posted, but they just need to be put together.

To run Windows Explorer as Administrator under a non-Administrator account, you have to:

  1. log into the computer as the Administrator
  2. open Windows Explorer
  3. goto the Tools menu and select Folder Options...
  4. goto the View tab and check Launch folder windows in a separate process

If you log into the computer as a non-Administrator, running

runas /user:administrator explorer.exe

will now work. This can probably be set via the registry, but I think this is the easiest way.

share|improve this answer
    
I voted this up but the accepted answer meant I didn't have to logout/in. Thanks! –  Brendan Oct 5 '08 at 13:06
add comment

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"
share|improve this answer
    
@Huppie try /separate switch as mentioned in my post –  Gulzar Sep 9 '08 at 22:17
    
@Gulzar: Thanks, that's a very useful tip. –  Huppie Sep 16 '08 at 14:16
add comment

If your question relates to your own computer, I cannot recommend SudoWin enough: it allows you to perform the "sudo" trick (supposedly a well-known Linux/Unix command) under Windows. In other words: it lets you run programs under your own account, but with admin privileges. This means that programs retain the preferences and settings they would have if they would run under your account (registry, user profile), but then with admin privileges, protected by the password of your own account. It's a feature you can't live without once you've got to know it, and the implementation is great!

[EDIT] And did I mention it's completely free (open source)?

share|improve this answer
add comment

I'm not sure if this link solves your problem, but it boils down to:

  1. Shift-Right Click -> Run As...
  2. Enter Administrator credentials
share|improve this answer
    
This is what I used to do with IE6 although it does not work any longer with IE7 - IE7 is launched but Explorer windows spawned do not have the right credentials. If you do this with Windows Explorer it just does not work. –  Brendan Oct 5 '08 at 13:05
add comment

@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.

share|improve this answer
    
@ceejayoz try /separate switch as mentioned in my post –  Gulzar Sep 9 '08 at 22:16
add comment

Best you might be able to do is check the "Open Folder in new Process" option (or something like that), then do runas. Caveats include:

  1. All folder windows must be closed, or it'll reuse the existing process token
  2. It's slightly slower
  3. To revert out of admin mode, you'll need to close all folder windows
  4. Any windows opened while in admin mode will also be adminned

This is a trick for Vista's UAC - YMMV on XP, and with a completely separate account.

I'd recommend just getting yourself another filemanager for admin tasks. Xplorer2 seems usable to me.

share|improve this answer
add comment

This works well for me:

runas /u:administrator "explorer /separate"

I can use it just as well for a domain user that has local adimin and have access to his network shares as well!

runas /u:domain\username "explorer /separate"

I can also spec a share if needed and BooM! Explorer opens up at that folder :)

runas /u:domain\username "explorer \server\share, /separate"

All quotes and commas must be typed as shown and if the share name has spaces, double quoted. Like ...

runas /u:domain\username "explorer "\server\share name", /separate"

Hope this helps someone.

share|improve this answer
add comment

This works for me to:

I am loged in as a non privileged User in a Treminal Server domain

From "Start" -> "Run" Open: runas.exe /u:administrator "explorer.exe /separate"

After hitting "OK" a "CMD" Window opens, asking for the machins "Administrator password", and "PLING" a brand new Explorer Windowe opens. Now you can do all of your file handeling as if you were loged into the Administrator account.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.