?
Solved

Outlook Web Access as Default mailto in Windows 7

Posted on 2011-09-22
12
Medium Priority
?
2,565 Views
Last Modified: 2012-05-12
I have tried this script below and it has worked with XP PC but no luck on the Win7.  Any help would be great!


' Initialize error handling
Option Explicit
On Error Resume Next

' Declare variables
Dim objWSHShell                        ' As WScript.Shell
Dim strInput                        ' As String

' Ask for FQDN to Exchange Server
'strInput = InputBox("Enter the Exchange Server full qualified domain name. Remember that if you are using SSL to use 'https: (like: <https://myserver.mydomain.com>) ")
strInput = ""
' Check if server FQDN has been supplied
If Trim(strInput) <> "" Then

      ' Put registry settings to make OWA a mail client one can choose in IE
      Set objWSHShell = WScript.CreateObject("WScript.Shell")
      With objWSHShell
            'adds Microsoft Outlook Web access as a Mail Handler on the system.
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\Outlook Web Access\", "Microsoft Outlook Web Access", "REG_SZ"
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\Outlook Web Access\Protocols\mailto\", "URL:MailTo Protocol", "REG_SZ"
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\Outlook Web Access\Protocols\mailto\URL Protocol", "", "REG_SZ"
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\Outlook Web Access\Protocols\mailto\EditFlags", &H00000002, "REG_BINARY"
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\Outlook Web Access\Protocols\mailto\DefaultIcon\", "%ProgramFiles%\Outlook Express\msimn.exe,-2", "REG_EXPAND_SZ"
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\Outlook Web Access\shell\open\command\", """%ProgramFiles%\Internet Explorer\iexplore.exe"" ", "REG_EXPAND_SZ"
            'sets the path and Variables to open up and address a message inside of OWA - used by Send to Mail selection
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\Outlook Web Access\Protocols\mailto\shell\open\command\", """%ProgramFiles%\Internet Explorer\iexplore.exe"" " & strInput & "/owa//owa/?ae=Item&a=New&t=IPM.Note&mailtoaddr=%1", "REG_EXPAND_SZ"
            'sets the path and Variables to open up and address a message inside of OWA - used by mailto: links
            .RegWrite "HKLM\SOFTWARE\Classes\mailto\shell\open\command\", """%ProgramFiles%\Internet Explorer\iexplore.exe"" " & strInput & "/owa/?ae=Item&a=New&t=IPM.Note&mailtoaddr=%1", "REG_EXPAND_SZ"            
            'changes the internet program setting for mail to defautl to OWA
            .RegWrite "HKLM\SOFTWARE\Clients\Mail\","Outlook Web Access", "REG_SZ"            
            End With

      ' Tidy up
      Set objWSHShell = Nothing
Else
      WScript.Echo "Please enter a valid Exchange Server full qualified domain name"
End If

' Tidy up
Set objWSHShell = Nothing

' Say good bye
WScript.Echo "Thank you for using this script."
0
Comment
Question by:Greythorn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36580807
I've never tried this sort of thing in Win7, but I can't imagine that they would make such a drastic change to the registry locations so that it would no longer work.  Do you see an error message when you try to run the script?  Have you checked in regedit to see if the new entries are created successfully?
0
 
LVL 1

Author Comment

by:Greythorn
ID: 36580834
I check the regedit the entries where not made.  I dont see any errors when i run the script.  I was more wondering if anyone had a script similar that works with win7.
0
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36580919
It's probably a permissions problem, rather than an issue with the script.  Is it possible for you to try to run the script as an administrator?  I know this isn't something most users will be able to do, but it will at least shed some light on the problem.  If you can successfully add the entries as an admin user, then either:

1.  Your normal logon can't modify that part of the registry, or,
2.  Your logon can't run any active scripts with the default security settings.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:win7expert
ID: 36580923
You can use the official Microsoft way to set OWA as default mail agent:

http://blogs.msdn.com/b/tmeston/archive/2004/01/08/48837.aspx

0
 
LVL 1

Author Comment

by:Greythorn
ID: 36581058
I have the keys in manually now.  The OWA doesnt show up in the Default mailto though.
0
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36581251
You closed/restarted IE after adding the reg keys?  Maybe you even need to log out/in?  I don't have Win7 in front of me today, so I can't test it for myself.
0
 
LVL 1

Author Comment

by:Greythorn
ID: 36581331
I did the reboot and still nothing... This was so easy in XP....
0
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36581368
Well, we know that there's someone at MS whose job it is to make sure that things get more complicated with each product version :-) .  There's nothing I can suggest right now - I will have to wait until tomorrow when I get a chance to try it in Win7 for myself.
0
 
LVL 1

Author Comment

by:Greythorn
ID: 36581487
Ok thanks
0
 
LVL 31

Accepted Solution

by:
LeeDerbyshire earned 2000 total points
ID: 36583680
Hm.  I ran the script, but now that I come to set the default email program, I can't see where to do it.  I expected to see it in the 'Set your default programs' window, but I see no option for email.  Probably because it does not have any other non-web-based email client programs installed on it.  But no matter, the script should have taken care of that, and if I do a quick mock-up page with a mailto link on it, and click on it, it does open the email compose page of OWA.  One thing you should note, though, is that OWA 2010 expects a &to= parameter instead of &mailtoaddr , so you'll have to change the script slightly.  If you get all this working, then we'll have to discuss how to get rid of the mailto: text in the recipient field.
0
 
LVL 1

Author Comment

by:Greythorn
ID: 36587376
I am still coming up with nothing... I would like to have it an option like in XP.  Any ideas?
0
 
LVL 31

Expert Comment

by:LeeDerbyshire
ID: 36587747
I'm afraid not.  When I tried it (the script in your original post), it did actually set it as the default mail program.  But I didn't find any way to select it as such in the GUI.
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question