Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Using DS to Determine the Default E-Mail Program

Updated: 23 Mar 2009 | 1 comment
carubin's picture
+9 9 Votes
Login to vote

Our company, a diverse media concern, is embarking on a program to standardize our e-mail on a single backend and with a common front end. As in most projects, one of the first steps is to determine where we are today. The project manager came to me the other day to ask if I could determine what the default e-mail client was on our fleet of workstations.

This did not appear to be a field that was consistently collected with either our Deployment Server or our Notification Server but a simple google search revealed that this information was stored in the registry in the key HKLM\SOFTWARE\CLIENTS\mail under Default.

I put together the dumb DOS job below and have run it on all of our workstations and created a procedure called "Default Mail Client" and have pushed it out over the past day:

-----------------------------------------------------------------------------
reg query HKLM\SOFTWARE\CLIENTS\mail /ve | find /i "Microsoft Outlook"
if errorlevel 1 goto next
exit 1
:next
reg query HKLM\SOFTWARE\CLIENTS\mail /ve | find /i "Lotus Notes"
if errorlevel 1 goto next1
exit 2
:next1
reg query HKLM\SOFTWARE\CLIENTS\mail /ve | find /i "Eudora"
if errorlevel 1 goto next2
exit 3
:next2
exit 4

-----------------------------------------------------------------------------

The return codes then get mapped to English values as follows:

  1. Outlook
  2. Lotus Notes
  3. Eudora
  4. Other

I then have a query in Microsoft that dumps the data into a csv for further analysis.

SELECT dbo_computer.name, dbo_event_schedule.status, dbo_computer.logged_on_user
FROM (dbo_computer INNER JOIN dbo_event_schedule ON dbo_computer.computer_id = dbo_event_schedule.computer_id) INNER JOIN dbo_event ON dbo_event_schedule.event_id = dbo_event.event_id
WHERE (((dbo_event.name) Like "Default Mail Client"))
ORDER BY dbo_event_schedule.status DESC;

Once again a hero!

Comments

ciscoman's picture
25
Mar
2009
0 Votes 0
Login to vote

Excellent

A very nice and helpful article

Good Work

Jeff