Friday, June 23, 2006

Customize IE Context-menu for RSS Bandit

I use RSS Bandit as my preferred RSS Reader. This application is based on .NET framework and has GUI very similar to Outlook 2003 (even some of the Outlook keyboard shortcuts work in this). It also has a built-in tabbed web browser, based on IE engine. This works well until multiple tabs are opened filling up entire space within RSS Bandit browser window. One of the desirable features that RSS Bandit is missing, is an option to open hyperlinks in a default web browser (IE/Firefox). It would have been nice to have a right-click context menu with an option like "Open in Default Browser" or Open in Internet Explorer".

However, this customization is very quick and easy to make, and requires only few registry entries and two lines of JavaScript code!

So, here goes step by step instructions to manually modify IE's context menu for "Open in Internet Explorer" option:

  • Create a .REG file with the following contents. Or download this REG from here. Double-click on this REG file to merge the registry entries.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Open in Internet Explorer]
@="C:\\Program Files\\RssBandit\\OpenInIE.htm"
"Contexts"=dword:00000022

  • Create a plain text file with the following contents, and save the file as OpenInIE.htm . Or right-click here to save the file in "C:\Program Files\RssBandit" (select Save Target As... instead of directly clicking on the link). This html file can be saved at any other location but ensure that you update the above REG file with the new location (for example - C:\Documents and Settings\Application Data\RssBandit\ where other user specific configurations are stored for RSS Bandit).

<script>
var shell = new ActiveXObject("WScript.Shell");
shell.run("iexplore \"" + external.menuArguments.event.srcElement + "\"");
</script>

I also use Firefox occasionally and therefore created similar files for a context menu to open links in Firefox instead of Internet Explorer. Download the REG and HTML files for creating "Open in Firefox" entry in context menu.

Theoretically, it should be possible to have a generic option like "Open in Default Browser" using the code javascript:external.menuArguments.window.open(external.menuArguments.event.srcElement), which should initiate the default browser configured on the system, but apparently it is the limitation in RSS Bandit which opens a new tab instead of opening default browser if the above code is used.

References: The Old New Thing

Thursday, June 22, 2006

Free VBSEditor

If you frequently develop VB scripts and use Notepad for editing, then you can use this decent free VBSEditor which also offers syntex highlighting. This is a single EXE file and doesn't require any installation.

Following steps will add an entry into context menu for VBS files to edit those files in VBSEditor.

  • Create a folder called "VBSEditor" in "C:\Program Files\" and drop VBSEditor.exe in "C:\Program Files\VBSEditor\"
  • Copy-paste the following text in a plain-text file and save the file as vbseditor.reg.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VBSFile]
@="VBScript Script File"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\VBSFile\Shell]
@=""

[HKEY_CLASSES_ROOT\VBSFile\Shell\Edit_with_&VBSEditor]
@="Edit with &VBSEditor"

[HKEY_CLASSES_ROOT\VBSFile\Shell\Edit_with_&VBSEditor\command]
@="\"C:\\Program Files\\VBSEditor\\VBSEditor.exe\" \"%1\""

  • Double-click on the saved vbseditor.reg to import required registry settings.

Now you can right-click on any VBS file and select "Edit with VBSEditor" for script editing.

Tuesday, June 20, 2006

Few must-know tools for basic system administration

Sysinternals offers some of the best free tools for basic as well as advanced system administration tasks. Among all, few must haves are:

  • TcpView - For monitoring network connections in real-time. GUI extention of netstat command.
  • Process Explorer - Shows detailed information of each of the processes running on the sytem. The best alternative to Task Manager.
  • AutoRuns - Shows detailed information of all the programs configured to run with system start. Much better than msconfig.

FPORT - This console based program from Foundstone shows all the open/active network connection details along with complete path of the executable. Another alternative to netstat command.

TIP: It is best to download and just drop all these tools in %SYSTEMROOT% folder so that you can execute them directly from Start-->Run or from console without specifying their path.

Few other useful built-in commands in Windows XP/2003:

  • GETMAC - Retrives MAC address of all the network interfaces from local or remote systems. NBTSTAT can also be used to retrive MAC address.
    GETMAC retrives MAC address from machine's WMI repository, whereas NBTSTAT relies on WINS database (which could be outdated). The advantage with NBTSTAT is that it can get you the MAC address of remote machine even if the target machine is not online, whereas, for GETMAC to work, the system should be online and accessible.
    User GETMAC /V option for verbose output to see the NIC name along with their MAC addresses. Without /v, it shows only the GUID identifier and not the actual NIC name.
  • HOSTNAME - To quicky find out local machine's NetBIOS name.
  • TASKLIST - To quickly list all the running processes on local or remote system. Run TASKLIST /V to see details similar to what Task Manager shows. While Task Manager is limited to provide only local machine's information, TASKLIST /V can get you the same information from remote systems even if that remote machine is running Windows 2000 where TASKLIST doesn't run locally.
    Run TASKLIST /SVC to enumerate all the child processes spawned by host processes like SVCHOST.EXE and SERVICES.EXE, Task Manager does not display these details.
    For example, if you find that SVCHOST.EXE is consuming maximum resources, the culprit process is usually one of the child processes running under svchost.exe, and not the svchost.exe itself. Thats when you can run TASKLIST /SVC to enumerate all the child processes running under svchost.exe.
  • TASKKILL - A very handy command for terminating processes running on local or remote systems, based on either process ID or image name. In my future post I'll explain how taskkill can be combined with tasklist to troubleshoot hanged service on local or remote systems.
  • SYSTEMINFO - Quickly retrives basic system information from local or remote systems. I usually use this command to get details like - system uptime (to determine last boot time), authentication server name, system hardware model, etc. You can also use MSINFO32.EXE to see similar output in graphical mode for local as well as remote systems.

How to save streaming media for offline viewing

Many a times we want to save online webcast streams (.wmv, .asx, .asf) but Windows Media Player doesn't save these streams which makes it impossible to view online webcasts in offline mode when you are not connected to Internet.

Among all the download managers that I tested, only Flashget was able to download and save streaming media contents because it supports mms:// protocol. With the latest version 1.72, it is completely free.

Download Flashget here: http://www.flashget.com/

Sunday, June 18, 2006

Take control of your career

Came across this great post (http://software.ericsink.com/Career_Calculus.html) by Eric Sink about how you can take control of your career.

It is our own responsibility to shape up our career, but sometimes we tend to focus on aspects which do not play any role in moving up in career scale.

His post also links to two additional posts, but those are 3 years old and are not available anymore. However, cached versions of those posts are still available at www.archive.org

Doug Reilly – Who is responsible for your career

Robert Hurlbut - I am responsible for my career

Sam Gentile - I alone am responsible for my technical growth

Eric Sink, who earned his B.S from University of Illinois, Urbana-Champaign (UIUC), is among the ones who had initially developed what is now known as Internet Explorer. On his about page, find an interesting flashback to mid-90’s when browser war had just started.

Personally, I find it very interesting to discover more and more people who are academically associated with UIUC. Ray Ozzie, who recently took over Bill Gates position as Chief Software Architect, has been honored as a distinguished alumnus of the University of Illinois at Urbana-Champaign.

Thursday, June 15, 2006

Speed up Internet Explorer

By default Internet Explorer does not allow more than 4 or 2 simultaneous sessions (HTTP 1.0/1.1) from the same source. You can, however, override this setting by adding few registry keys.

Execute the following two commands to add the required values.

  • REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPer1_0Server /t REG_DWORD /d 20

  • REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MaxConnectionsPerServer /t REG_DWORD /d 20

More information, including reason for the default limit, is available at http://www.winguides.com/registry/display.php/536

Friday, June 02, 2006

Mirror page of: Jeroen van de Kamp on Using Flex Profiles

The following page/link (BriForum 2005 Video: Jeroen van de Kamp on Using Flex Profiles) is no longer available on Brian Madden's site and shows error. Becasue this link is extremely useful, I am just mirroring the contents that I got from Google's cache version of the same page.


BriForum 2005 Video: Jeroen van de Kamp on Using Flex Profiles

Author Information
Jeroen van de Kamp

November 28, 2005

Since their debut two years ago, the concept of the "flex" profile has taken the server-based computing world by storm since they have the advantages of roaming profiles without the headaches. We owe this success to the original visionary of the flex profile: Jeroen van de Kamp, the creator of the free Flex Profile Kit.

In this double-session (two hours), Jereon himself presents "Flex Profiles in practice." This session covers practical and in-depth implementation scenarios and best-practices for Flex Profiles.

We'll start with why and when to consider Flex Profiles and then move into the technology basics, profile folder content redirection, mandatory profile configuration, optimizing performance, implementation strategies, migration tactics and scenarios, and how to get around known limitations (FlexRefresh.exe). We'll close the session with live scripting and implementation examples.

Here's his session from BriForum 2005.

Download the video of this session, WMV format (Part 1 - 64MB, Part 2 - 57MB)

Download the audio from this session, MP3 format (Part 1 - 14MB, Part 2 - 12MB)

Download the PowerPoint slides from this session (2MB)