Hkey Local Machine Software Clients Mail Default Program Associations
When I first started doing the groundwork for this article I incorrectly assumed that the default mail client was a setting that each user could change in Windows.
What I mean is – I thought if ‘USER A’ logged in, set the default email client…then ‘USER B’ could login to their account and set their own default email client.
After testing many different ways I have found that it does not work this way at all.
HKEYLOCALMACHINE Software Clients Mail. The name of each subkey is the name of an installed e-mail client on the workstation. More Information. The default e-mail client is typically configured through the Programs tab in the Internet Properties dialog box. However, if you are not a member of the local adminisrators group you may not have enough permission to make this change (because the setting is stored under the HKEYLOCALMACHINE hive in the registry).
If you are not an administrator, windows will gladly let you go into the internet settings under the control panel – and make the change:
Unfortunately it does not give you an error. If you go back into the settings, it will have reverted back to the original default email client.
This is because the setting is located in the HKEY_LOCAL_MACHINE hive of the registry, and there is no corresponding HKEY_CURRENT_USER entry. If you create one on your own, windows will simply ignore it.
Here is the key for setting the default email client:
HKEY_LOCAL_MACHINESoftwareClientsMail
If you drop down to this in the registry, you can see that the ‘default’ value on the right is what sets the default email client.
Now, obviously the email client must exist for you to set it. The behavior of windows is undefined if you set it to something that is nonexistent. In other words it might cause some applications to do crazy stuff when trying to access email (If you set it to a client you have not installed on the machine already).
Vim, on the other hand, is based on the powerful Vi app, which is a text editor developed for the Unix operating systems.Among other additions, the provides support for using hotkeys, includes a full-screen mode, allows you to work with transparent backgrounds, and much more. Mac vimfor mac os x. Learn how to use via the built-in helpThe main window is represented by minimalist text windows where you get to input your data. Keep in mind that, even though MacVim can process text, it is not intended to be a WYSIWYG processor.
The first step in setting it across our network is to figure out how to set it from the command line. This part is easy. We can use the “REG” command. If you don’t know about it, the REG command allows you to update the registry from the command line. It has been built into windows since XP, and can be added to 2000 by installing the Windows 2000 Resource Kit.
Using the REG command, we create a simple script that looks like this:
reg add HKLMSoftwareClientsMail /ve /f /d “Microsoft Outlook”
If you are wondering about the command line options –
/ve – this tells it to set the (Default) value for this key
/f – Don’t prompt us, just set it
/d – Following this argument is the data we want to set
In our example we update the machine’s default email client to Microsoft Outlook. You could just as easily set it to Outlook Express.
The big question now is how can I update when most of my users are not an administrator?
Group Policy is our friend.
I am going to open the group policy for my collection of machines I want to update, and drill down to
Computer Configuration -> Windows Settings -> Scripts
This is important. Make sure you do this under Computer Configuration not User Configuration. Otherwise it will be run in the context of the user, and it will fail if they are not an administrator.
When you select it, you will see Startup, and Shutdown on the right. Double click startup. When the properties window shows up, click on Add.
This will open a window that allows you to type the name of the script, and parameters. Click on browse – this will bring you directly where the computer scripts default to. I suggest you create your computer configuration login script right here. Do it by right clicking and creating a new text file. Rename it to logon.bat. Edit it, and paste in the code I showed you above. Now save it….and select it.
Click OK on all of your open windows, and in about 15 minutes your computers should refresh their policy. The next time you reboot the default email client will be updated across your network.
One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools