Question : Create Shortcut to open default email client

I run an all windows network.  User have roaming profiles that follow them around the office.  All my computers are on three year leases.  I replace a set of computers ever year.  Some computers have office 2003 and some have office 2007.  This creates a problem with users needing two icons for outlook on their desktop and knowing which one is correct for that machine.  As much as I tell them to use the start menu they don't.

Is there a way to create a shortcut to open the default email client?  I have found a way to open a new email message but I want to open up to the outlook inbox not just a new email message.  Can this be done?

Answer : Create Shortcut to open default email client

Paste the script below into a text file with a .vbs extension.  Running it will retrieve the path of the default mail client from the registry and launch it.

This should work with any mail client, not just Outlook.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Const HKEY_LOCAL_MACHINE = &H80000002
 
On Error Resume Next
 
strKeyPath = "SOFTWARE\Clients\Mail"
strValueName = ""
 
Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv")
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strClientName
 
strKeyPath = strKeyPath & "\" & strClientName & "\Shell\Open\Command"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strCommand
 
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run strCommand
Open in New Window Select All
Random Solutions  
 
programming4us programming4us