Tip

Save time and build an administrative launchpad

This tip was submitted to the SearchWin2000 Tip Exchange by member Jacob Balser. Let other users know how useful it is by rating the tip below.


Most administrators are pressed for time, working on major projects while constantly being interrupted by smaller problems. We can't waste time "mousing around" a GUI, shift-right-clicking every support tool and typing in credentials. Even command-line savvy admins can be reluctant to type a fairly long command string every time they want to run a program with an alternate account. Fortunately, you can combine RunAs with CMD to create a launchpad to quickly access administrative tools.

Create a shortcut to CMD (It lives in systemrootsystem32.) on your desktop or start menu and name it something descriptive like "Admin DOS." Right-click the shortcut and select properties. On the Shortcut tab, type the following string in the target field then click OK (substitute the name of your domain and admin account in the /user option): runas.exe /user:domainusername /profile cmd

When you open the shortcut, a command line window appears briefly so you can enter your password; then the actual CMD window appears, running in the context of the administrative account.

Notice the use of the /profile switch in the example. This tells RunAs to load the profile of the admin user for the program. For CMD, this means settings like the scrollback buffer and colors will be the same every time you open it with the RunAs shortcut. Tweak the CMD properties to set the foreground color to be green and save those settings for future use. The next time Admin DOS is opened it will use green text to let you differentiate the Admin CMD from a regular CMD. Loading the profile also means that network volumes mapped to drive letters by the administrator are preserved and automatically connected every time admin DOS is opened.

After logging in as a regular user, open this CMD and let it run, minimizing it until you need it. If you need to run an administrative tool, like Active Directory Users and Computers, instead of creating an individual shortcut for it or shift-right-clicking its icon, type "dsa.msc" from the green CMD window. The tool will function just as if you had logged into your computer as a Domain Admin. This is very helpful when using Support Tools and Resource Kit utilities, many of which are command-line programs, or administrative scripts you've created yourself.

The main benefit is that you can login to your workstation as a domain user, but still use administrative tools without repeatedly entering new credentials. This often means memorizing ugly 8.3 file names for executables, but in the long run, you will save time and extra keystrokes.


This was first published in May 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.