Have you noticed that most newer devices come preconfigured with something like “Sent from my Windows Mobile device” as the tag-line on emails? Have you been annoyed by this? Or worse – have you received emails from other people who have found out how to change this, and configure it to be something catchy/annoying?
Now as an ordinary user it’s ok. There is a default setting, and you feel ok with being left to your own devices (bad pun intended), and setting it to whatever you like at least for your own emails. But in an enterprise setting you may want to have a company standard, or go for a very neutral solution and remove it altogether.
And I’ve bet you’ve wondered which registry key contains this string if you’ve had these thoughts. Well, here’s the fun thing. There is no registry key to control this. As far as I am able to tell you can only configure this programmatically. A Google search will provide what you need of code to implement it in your own application, but I haven’t found a ready-made program that will let you do it. Granted – since there is an interface on the device for doing it, most members of the user base will be happy with that. But I want something I can trigger server side. So without further ado; I had to fire up my Visual Studio.
Now, obviously there’s a limit to how fancy you can make an application like this. But my basic requirement is an application that can run silently in the background with no user interface. The settings are stored in the registry so they can easily be configured through an MDM solution.
You’ll notice that you can configure the actual signature, whether to use on “RE” and “FW” as well, and of course which message account it applies to. (Apply it to all your SMS messages!)
These are the same settings my application will use, and I’ve decided that you need to set the following registry keys to make it work:
Default Value: “” (blank)
Use signature with this account
0 = Disabled, 1 = Enabled (default)
Use when replying and forwarding
0 = Disabled, 1 = Enabled (default)
Maybe you’re happy with my defaults (which are set at install time), or you can provision these settings yourself after installation. Here is an ADM template to do it from SCMDM, but the application will work with other MDM solutions as well:
CLASS MACHINE CATEGORY "Windows Mobile Settings-Extended" CATEGORY "Email Signature" POLICY "Signature" KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\SOFTWARE\MobilityDojo.net\DojoSig\" EXPLAIN "The signature that will be used." PART "Signature:" EDITTEXT VALUENAME "Signature" DFEUALT "" END PART END POLICY POLICY "Enable Signature on emails" KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\SOFTWARE\MobilityDojo.net\DojoSig\" EXPLAIN "Lets you enable or disable the use of signatures on emails sent from device." VALUENAME "UseSignature" VALUEON NUMERIC 1 VALUEOFF NUMERIC 0 END POLICY POLICY "Enable Signature on reply/forward" KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\SOFTWARE\MobilityDojo.net\DojoSig\" EXPLAIN "Lets you enable or disable the use of signatures on mail that is replied to and/or forwarded." VALUENAME "UseReplyForward" VALUEON NUMERIC 1 VALUEOFF NUMERIC 0 END POLICY END CATEGORY END CATEGORY
In the Group Policy Editor it should look similar to this.
One thing to be aware of – I only apply these settings to the default message store, which should be ActiveSync/Outlook on most devices. I have not included a setting that let’s you choose another message store.
I started out my implementation based on a blog post from the Windows Mobile team, and if you want to do your own implementation you can probably use it as well:
I’ll admit that my C++ was a little rusty as I do most utilities in C#, but there was no easy way to do it in managed code so I had to get my hands dirty. (Yes, I could have written a dll in C++, and used this in C# but that seemed overkill for something as “simple” as this. Or do messy P/Invokes to MAPI.) But enough of my problems as they say 🙂
The application is packaged in a cab as this sets the default registry keys, puts the executable in a folder, and run it once. I install a shortcut in the “Startup” folder, so it’s run every time the device is soft reset. This is to make sure the signature is set again if the policy is changed server side, or the user decides to change it. It’s not a proper interval method for reapplying, but I believe it’s good enough at the present time. You can rip the exe out of the cab and do it all manually if you like. There is no interface – running it will just read the registry and “do it’s magic”.
As there might be bugs, and I haven’t really written a lot of failsafe mechanisms in the code I consider it a Release Candidate. If nothing major comes up there will only be this release 🙂