[xplorer˛] — Exploring in admin mode
home » blog » 13 July 2008
play flash demo
 

You have heard me many times advocating the use of limited user accounts for your day to day computer use, which protects you from viruses and internet nasties. In the rare occasions you have to deal with an administrative task (e.g. installing a program) you can launch an explorer window using RunAs and start the installer from there — note that when you start a program from an already elevated process, it also runs in elevated mode.

You may have noticed that under this scenario windows explorer (or xplorer˛ for that matter) goes deaf with respect to filesystem changes. Delete or add a new file and the view remains unchanged. The file has been removed from disk but you still see it before your eyes and wonder why. The reason is that the filesystem monitor and autorefresh mechanism is broken when you enter administrator mode via RunAs.

This fault is not the end of the world; you can press <Ctrl+R> to force a manual refresh of a folder's content. But what if you need to keep an elevated window open for long? xplorer˛ supports an alternative folder autorefresh mechanism that works in administrator mode too. You turn this feature on through the registry settings editor.

If you aren't too fussy, that should be the end of the problem. Autorefresh will work in all modes, whether you are running normally or as an administrator. But if you are a perfectionist you may be slightly alarmed learning that this secondary folder autorefresh mechanism will introduce some inefficiency in xplorer˛, which is unwanted for most of the time. Why handicap your daily file management with a workaround that is only meant for exceptional circumstances?

The complete solution is simple: create a separate set of user preferences (settings) and turn the inefficient autorefresh on only there. Then use a new shortcut to launch xplorer˛ using these different preferences. You only use this shortcut when you want to run as an administrator. The implementation is explained below. It looks a bit complicated but it will give a good workout to your advanced xplorer˛ skills. Here's how:

  1. Start xplorer˛ as administrator. We want to edit settings of a different user so this is an essential first step.
     
  2. Create a new layout. A xplorer˛ layout is the term used for all program settings, including window position and autorefresh modes among other things. Window > Save layout menu command creates a new layout based on your current window preferences. Let's call it admin. Behind the scenes this will create a new registry key called HKCU\Software\ZabaraKatranemia Plc\xplorer2_UC.admin.
     
  3. Activate alternative autorefresh. This is an advanced setting controlled by the stand alone registry settings editor (x2SettingsEditor.exe), which you will find in the installation folder (typically C:\Program Files\zabkat\xplorer2). Make sure you select the correct registry key from the drop-down list box (xplorer2_UC.admin) and check the box "Alternative autorefresh mechanism".
     
  4. Create a new desktop shortcut. This will be used to launch xplorer˛ in admin mode. We use the /S command line switch to tell xplorer˛ to use the new set of preferences we just defined. In the Target box of the shortcut properties we add the /S:admin /P after the executable name. /P is required to force a new xplorer˛ process.

Confusing? I was going to create a demo video detailing all the steps but Wink isn't very smart capturing input from windows running with different credentials, so today's demo is only showing step 4, which should be done on the normal user's desktop. Have a look!

The administrative shortcut is perfect candidate for the trick we discussed the other day, since we are going to be launching it with alternative credentials all the time. Finally note that the alternative autorefresh is not perfect as it won't be very accurate for remote network folders. But it's fine for local hard drives.

Post a comment on this topic

 

 

What would you like to do next?

Reclaim control of your files!
  • browse
  • preview
  • manage
  • locate
  • organize
Download xplorer2 free trial
"This powerhouse file manager beats the pants off Microsoft's built-in utility..."

download.com
© 2002—2008 Nikos Bozinis, all rights reserved