topics that matter; ideas worth sharing

share a tip, submit a link, add something new

Windows Tip: Beyond the run box

August 13, 2007, 05:09 PM —  ITworld.com — 

Send your Windows question to Mitch today! | See other Windows tips


One of my favorite Windows keyboard shortcuts is WINDOWS + R (pressing the WINDOWS key and R key simultaneously). This brings up the Run box, which lets me type UNC paths and get to network shares a lot faster than browsing My Network Places. Not only that, I can even type C: in the Run box to open my system drive in Explorer, type Control Panel to open the Control Panel, or even type an URL to open a Web site using Internet Explorer. And the Run box even remembers my most recently typed paths and URLs in -- guess what -- a Most Recently Used (MRU) list saved in the Registry location HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU.



And therein lies the problem. I like to use the keyboard as much as possible and avoid using the mouse, but if I use my Run box for so many different purposes, my RunMRU key fills up with too many saved entries for me to make useful use of this feature. My main priority is for frequently-used UNC paths to be easily accessible from the Run box, so it would be nice if there was an alternative way for me to easily open Web site URLs by simply typing them.



Well, where there's a script, there's usually a way. Here's a simple VBScript script that, when run, displays an input box that let's you type an URL such as www.mtit.com (my Web site), press ENTER, and open the URL using Internet Explorer:


Dim strURL 
Dim oShell
Set oShell = CreateObject("WScript.Shell")
strURL = InputBox("Type an URL:")
If Len(strURL)>0 Then 
                oShell.Run """c:\Program Files\Internet Explorer\iexplore.exe"" " & strURL
End If

Open Notepad and make sure Word Wrap is turned off, then copy and paste the above code into Notepad, and save the script as OpenURL.vbs in some directory on your hard drive. Now create a shortcut on your desktop to your OpenURL.vbs file. Then right-click on your shortcut, select Properties, and define a keyboard shortcut such as CTRL + ALT + U so you can run the script without having to touch your mouse. For example, to open my Web site, I simply press CTRL + ALT + U, type www.mtit.com, and press ENTER. And notice I didn't even have to type a http:// in prefix since the script opens whatever I type in Internet Explorer, not Windows Explorer. (With the Run box, if you want to open a Web site that doesn't have www in it, you must type the full URL including the prefix e.g. http://support.microsoft.com.
Of course, the disadvantage here is that the script has no memory, so I can't type a partial URL and have autocomplete suggest the rest. But maybe an enterprising reader who is knowledgeable in script and has nothing better to do can modify the above script to have it save entered URLs in a text file and display then in a listbox for easy access. Any takers? Send your script to me if you figure out how to do this and I'll share it with other readers of this newsletter.

 

ITworld.com

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

More Resources