Standardized Outlook Signatures…For FREE

Well, apparently 10 bucks a user isn’t cheap enough for some people, so I had to figure out a cheaper (read: FREE) way to push out standard signatures to our users. It doesn’t make sense to create signatures for each employee by hand, and I can’t really trust users to follow directions in an e-mail telling them what signature they have to use, so what we have here is a completely automated way to push out a standardized company signature to your Outlook 2003 users leveraging the information you have in Active Directory.

Big credit goes out to joshiieeii over at the AutoIt Script forums. I could have easily coded this myself, but his post HERE saved me most of the effort. Why reinvent the wheel anyway? Josh’s original script used some XML files and ExCmd to create your custom signatures and even pushed your signature out to OWA. The OWA support is more than I wanted though, and the XML approach was a bit tedious IMO, so I modified his script so that you basically create your html, rtf, and plain-text sigs as individual files and it modifies them for each user using the data stored in AD. This makes it much easier to go back and make changes to your signatures on the fly instead of having to dig back down into the script and XML documents to make a simple change. Once you have your signature templates setup, just configure a GPO to run the script at logon and it will silently create HTML, RTF, and plain-text signatures for each user.

I’d just like to interject here that AutoIt is a VERY powerful and little known scripting language which I have used to write all kinds of utilities in the past. I strongly recommend that you check it out if you have any interest in writing your own scripts and don’t want to mess with vbs or, god forbid, batch files.

So, THAT solves the problem of how to create the sigs, but how in the world do you push that change out to all your desktops? We’re talking about an Active Directory enabled environment here, so it makes most sense to leverage GPO’s for stuff like this. Unfortunately, the Outlook 2003 administrative template (OUTLK11.ADM) that Microsoft provides only gives you the option to disable signatures — what’s the point in THAT? So, MS didn’t provide us with a way to administratively set a default signature for Outlook, but as usual the lovely Sue Mosher has the answer for all things Outlook. Seriously, I cannot count the number of times I have been researching a problem only to have Sue come up with the answer. In this newsgroup post, Sue links to a small ADM file (contents below) that will allow us to set a default signature via GPO. I merged this into my existing OUTLK11.ADM file (just open it in notepad) so that the resulting “Signature” category looks like this:

CATEGORY “Signature”
POLICY “Disable signatures for new messages”
KEYNAME Software\Policies\Microsoft\Office\11.0\Common\MailSettings
    PART “Disable signatures for new messages” CHECKBOX
                VALUENAME NewSignature
                VALUEON “”
    END PART
    END POLICY
POLICY “Disable signatures for replies and forwards”
KEYNAME Software\Policies\Microsoft\Office\11.0\Common\MailSettings
    PART “Disable signatures for replies and forwards” CHECKBOX
                VALUENAME ReplySignature
                VALUEON “”
    END PART
    END POLICY
POLICY “Signature for new messages”
KEYNAME Software\Policies\Microsoft\Office\11.0\Common\MailSettings
    PART “Signature for new messages” EDITTEXT
                VALUENAME NewSignature
                
    END PART
    END POLICY
POLICY “Signature for replies and forwards”
KEYNAME Software\Policies\Microsoft\Office\11.0\Common\MailSettings
    PART “Signature for replies and forwards” EDITTEXT
                VALUENAME ReplySignature
    END PART
    END POLICY
END CATEGORY
END CATEGORY

Then I just added the ADM file to my policy and configured it to point to the name of the signature files I created using the script. For example, if the files generated by your script are mycompany.txt, mycompany.rtf, and mycompany.htm, then you would just use “mycompany” as your signature name when configuring the GPO. You can even use command-line variables here (%username% for example).  Note that you MUST have Office 2003 SP2 installed for this policy to work.

And that’s it! You now have a fully automated signature for all of your Outlook users based on the information in Active Directory and enforced by Group Policy! It doesn’t get any easier than that!

You can grab my version of the script here, and my modified OUTLK11.ADM file here.

Advertisements

51 thoughts on “Standardized Outlook Signatures…For FREE

  1. I’m trying to access your script and adm files, but the links to the ftp site do not appear to be working.

  2. ah yep. our firewall management console crapped out when i was posting this and i forgot to go back and allow ftp for this server. will fix it now!

  3. sublimnl :

    setting default signature through GPO was very useful,
    Thank you very much for this help, but i also have outlook 2007 and the ADM file is different from that in outlookj 2003.

    any solutions

    Thanks

  4. Sorry, but I don’t undesrtand what I do with au3 file. I download a program called autoit but doesn’t works me. Can you explain how I generate this file with this script?

    Thanks a lot!

  5. @Nile: I’ll see if I can figure out Outlook 2k7 when I have some time.

    @JORDI: The au3 file is just a script that needs to be compiled before you can run it. You first need to create your three signature templates (html, rtf, and txt) and then modify the au3 script so that it will update your templates with all the proper information for each user. Once you have that working you have to compile the script. Assuming you downloaded and installed AutoIt, you can right click the au3 file and you should have one option to edit the file and another to compile it. Compiling the script will turn it into an EXE so that you can run it on any computer. If you need help beyond that, then the AutoIt forums are fantastic, as is the help file that is included with the AutoIt installtion.

    Hope that helps.

  6. Thanks a lot sublimnl, I solve this problem.

    I can’t probe this yesterday in my company and doesn’t work me. It works well if I execute the EXE file in my computer but in all the computers connected on my windows server doesn’t works. How I can execute this EXE file in all the computers of my company?

    Thanks in advance, Jordi.

  7. @JORDI: Sorry, but there are too many variables here for me to say why it would work on your PC but not on other computers on your network. Need more information. What happens when you run it? Do you get any error messages? How far along does the script get before it fails? Have you checked to see if the files are being created in the signatures directory?

  8. Hi subliminl,

    It runs well, create the .txt, html and rtf into signature folder of the server. But it doesn’t create the files into all computers of the company.

  9. Hi sublimni,

    Thanks for putting me on the right track, ive nearly got it figured but the link to your script seems broken and i’d like to see how you did it

    cheers,
    Doug

  10. @JORDI: You have to run the script on each computer. I use a logon script GPO to do this. Once you do this the files will be created in the c:\documents and settings\\application data\microsoft\signatures directory on each machine for the user that just logged in.

  11. I’ve imported your template, but I don’t know what to fill in the textbox of “signature for new message” and what do i have to do with the script??? do I run it, do I have to make changes to it??

  12. Hi guys, I also found a website with scripts like that.

    But we have a problem the momente we execute this script at startup of the pc we get a message : The script you are executing is taking longer then expected to run. Click end to abort the script or continue to continue execution.
    If I do not click any buttons and just wait …then after 50 seconds the pop-up close itself and the signature was made.

    And when I run the script after the pc has start up (after 3 to 5 minutes), the script execute without problems or pop-up.

    It seems that the pc’s have a problem when being in startup fase to make a worddocument in the background.

    Is there anybody who could help me out or give me a clue where to search for?

    thanks for any response.

    Didier

  13. @Carol: In the “signature for new messages” text box you would put the name of the signature files you are creating. Do not put the extension. So if the script is creating autosig.htm, autosig.rtf, and autosig.txt then you would just put “autosig” in this box.

    As for the script, you need to modify it for your purposes and make sure that you have already setup your signature templates (tmp.htm, tmp.rtf, and tmp.txt) so that it can create the signature files based on your templates. You will need those files in the same directory as the script when you compile it to an exe. The exe will be completely stand-alone and will not require the tmp files.

  14. @Didier: Never seen a message like that on Windows logon scripts. Maybe you can get a screenshot of it and post a link to it? Will try to help if I can, but not sure why your script would be hanging like that…maybe its having trouble getting the data from Active Directory? You might need to modify the script so that it outputs its progress to a log file so you can tell where its getting stuck.

  15. I made all steps, but i use %username% in Admin template in GPM, because we generate all signatures of company. But when apply GPO, nohing happens. So I check in Outlook–>option–>MailFormat–>signatures and see all buttons are greyed, and my sgnature not works….:-(….any idea?

  16. @Gustavo: Are the signature files being created by the script? Check in c:\documents and settings\username\application data\microsoft\signatures. If the htm, rtf, and txt files are not there then thats your problem.

  17. I compiled the script and when i run the exe it creates the files in the signatures directory but the html, rtf and txt files are empty. How do i get it to export the data into the documents?

  18. @chris: It sounds like you did not create the template files for the script to work with. you need to have three template files in the same directory as the script when you compile it. The files should be named sig.txt, sig.rtf, and sig.html. These will serve as the templates for your signatures, so make them look how you want.

    Once you do that, search the script for the “_ReplaceStringInFile” and you will see the lines that are replacing the data in the template with the data retrieved from Active Directory. You’ll need to make sure your template matches the search strings in the script or else nothing will be replaced. Don’t forget to check out the AutoIt3 help file if you have trouble on syntax.

    Also, depending on what your intended signature looks like you may have to play with the RTF and HTML replacement strings in the “_ReplaceStringInFile” lines of the script since they are customized for the way my signatures are supposed to be formatted.

    Good luck.

  19. Hi sublimnl,

    When i try to compile the file, i get the error: “error adding file: sig.html”

    I have my signatures files with the name sig.html, rtf and txt.

    I tried deleting my signatures files but the same error.

    What’s wrong?

    Thanks

  20. As a matter of fact I did, but it was not possible via GPO. I ended up modifying my script to edit the registry directly to specify the signature location. The location in the registry varies depending on how the Outlook profile is setup and the value for the sig is written in binary format. A real pain.

    Basically, you want to goto HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profile\\9375CFF0413111d3B88A00104B2A6676.

    Then find the subkey which has a binary value called “Identity Eid”. This will be written in binary format and will be the DN for the Exchange account used on that profile.

    In this key you want to create two binary values: “New Signature” and “Reply-Forward Signature”. You’ll then need to write the name of your signatures there WITHOUT the file extension and in BINARY format. So for example if your sig files are called corporate-sig.html, corporate-sig.rtf, and corporate-sig.html, then you will enter “corporate-sig” here in BINARY format with “00” between each and every character. To see what I mean about the “00” just create a sig manually in Outlook and look at the way this value shows up when you edit it in the registry.

    The last catch is that the value MUST END with “000000” so be sure to make sure that your binary value ends with six zeros or it won’t work.

    Complicated enough? Yeah, I think so. I modified my script to do the magic, but its specifically written for my company since it depends on the DN of the Administrative Group of my Exchange servers to make sure it is in the right place in the registry.

  21. Hello,
    I like it…! but will this also included a graphic logo in the email signature? I built my template to include a logo but it does not copy over the folder when launching the compiled exe file.

  22. John, you will need to modify the script to copy the logo over. You’ll need to add an additional FileInstall line to do this. Check out the AutoIt help file for syntax on this command. It’s very simple.

  23. Hi,

    The script does work like a charm and it looks great. Has anyone run across an issue with the new signatures not showing up when using Word as the editor? The CEO wants to use Word because it handles switching the signature in mail accounts better.
    Thanks!

  24. Keith,

    I have not run into that issue here. Is the script generating both the htm and html files for the HTML version of the signature? I think I vaguely remember that when using Word as the editor that it wanted one of those two extensions.

  25. That is exactly it. Word doesn’t like .html but works just dandy with .htm. And the script is currently only making a .html signature. I never would have thought of that. Thank you so very, very much!

  26. Is there a sample of the signature you’re using??

    I rarely add signatures to my emails, however the bosses have requested a standard email signature and this would help greatly. If only I can figure out the template….

    Mark

  27. Ok, so I fudged together a basic template just to see if it worked. I compiled the script. And I clicked on the exe file. I get an error message.

    And i quote:

    AutoIT Error: Line -1:
    Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

    I downloaded the au3 file to a folder added my templates and compiled.

  28. @mcangeli: Hard to say what your problem is due to the way that AutoIt shows errors after scripts have been compiled. I would recommend that you download Scite for AutoIt from the AutoIt site and then open the script in there and run it by pressing F5. If there are any errors the console will tell you exactly what line it is on so you can have more of a clue as to whats happening. If you need further help after that then let me know.

  29. @sublimnl

    This script and tools seems to be what we need for our Outlook 2003/2007 clients. Is your FTP server up so I can grab your .au3 file? Or could you email to me? Thanks!

  30. please can you show me how to create my own signature and where in the script should i modify.
    should also change something in the outlk11 file,
    thamks

  31. @sublimnl

    Thanks for your help. I follow your instructions and it works fine when I test it on my local machine. I got a small problem when distribute the script: I have a .reg file to update the registry but different version (2k3/2k7) has difference reg path name e.g.
    2k3:
    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profile\OUTLOOK\9375CFF0413111d3B88A00104B2A6676.
    2k7:
    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profile\Bryan\9375CFF0413111d3B88A00104B2A6676.

    Do you know how to read the registry path dynamically from .reg file? Thanks a lot.

    My .reg file look like this:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\bryan\9375CFF0413111d3B88A00104B2A66760000002]
    “New Signature”=hex:70,00,61,00,72,00,74,00,6e,00,65,00,72,00,73,00,53,00,69,\
    00,67,00,6e,00,61,00,74,00,75,00,72,00,65,00,00,00
    “Reply-Forward Signature”=hex:70,00,61,00,72,00,74,00,6e,00,65,00,72,00,73,00,53,00,69,\
    00,67,00,6e,00,61,00,74,00,75,00,72,00,65,00,00,00

  32. Hi

    This is really dumb as i am new at this stuff
    i added the adm template but where do i copy the script too….. the path

    Thanks

  33. Hi,

    I’ve downloaded and extracted the emailsig.zip file aswell as AutoIt v3 and SciTe. I’ve also placed 3 empty files; sig.html, sig.txt and sig.rtf into the same directory as emailsig.zip’s unzipped contents.

    When I try to compile the EmailSig.au3 file I get “Au2Exe Error Invalid FileInstall() function:” dialogue box.

    The EmailSig.exe file is created, but once I click “OK” on the error dialogue box the executable disappears. I can’t seem to get any more info about the error as no code is quoted.

    Can anybody help?

  34. hello
    i have managed to get the signature but the group policy to lock down the signature is not working. am using outlook 2007 and i have added the adm files for group policy.
    do i need to install a service pack for office / outlook 2007 for this policy to work.
    Please help am getting desperate with users not using the recommended signature.mgt on my case
    Ps. the signature is also on some machines not set as default but it s among the signature available to be set / chosen as default

  35. I created the sig templates and put them in the same folder with the script. I get an error when compiling it.
    Line 17 (file: path to sig andscript files)
    #include &lt
    Error: Cannot parse #include.

    Any idea why that would happen?

  36. Hi,

    I’m trying this now on a Windows 7 computer which is part of my domain.
    I placed the script and sig.html, txt and rtf files in a map on the desktop and tried to compile. Then i get the exact error as ‘Victor’…
    “Error adding file: sig.html” with an OK-button.

    Got any more suggestions here…

    Thx.

  37. Where do you have your html, rtf, and txt templates stored? They should be in the same directory as your AU3 script when compiling. You can also try specifying the path to the files on the “FileInstall” lines. The syntax for that function is…

    FileInstall ( “source”, “dest” [, flag] )

    Parameters

    source – The source path of the file to compile. This must be a literal string; it cannot be a variable. It can be a relative path (using .\ or ..\ in the path).
    dest – The destination path of the file with trailing backslash if only the directory is used. This can be a variable.
    flag – [optional] this flag determines whether to overwrite files if they already exist:
    0 = (default) do not overwrite existing files
    1 = overwrite existing files

  38. Office 2007 adm template

    For anyone interested, I’ve just worked out how to add the default signatures for new messages and replies into the Outlook 2007 adm template.

    1. Open the outlk12.adm template and search for stationery and fonts. At the end of this category you will find:

    END CATEGORY
    END CATEGORY

    2. Delete one of these lines so there is only one “END CATEGORY”

    3. Copy and insert the following after the one remaining “END CATEGORY” (between the lines)

    ______________________________________________________
    CATEGORY !!L_Signature
    POLICY !!L_Disablesignaturesfornewmessages
    KEYNAME Software\Policies\Microsoft\Office\12.0\Common\MailSettings
    PART !!L_Disablesignaturesfornewmessages CHECKBOX
    VALUENAME NewSignature
    VALUEON NUMERIC 1
    VALUEOFF NUMERIC 0
    END PART
    EXPLAIN !!L_SignatureChoose
    END POLICY
    POLICY !!L_Disablesignaturesforrepliesandforwards
    KEYNAME Software\Policies\Microsoft\Office\12.0\Common\MailSettings
    PART !!L_Disablesignaturesforrepliesandforwards CHECKBOX
    VALUENAME ReplySignature
    VALUEON NUMERIC 1
    VALUEOFF NUMERIC 0
    END PART
    EXPLAIN !!L_SignatureChoose
    END POLICY
    POLICY !!L_Signaturefornewmessages
    KEYNAME Software\Policies\Microsoft\Office\11.0\Common\MailSettings
    PART !!L_Signaturefornewmessages EDITTEXT
    VALUENAME NewSignature

    END PART
    EXPLAIN !!L_SignatureChoose
    END POLICY
    POLICY !!L_Signatureforrepliesandforwards
    KEYNAME Software\Policies\Microsoft\Office\11.0\Common\MailSettings
    PART !!L_Signatureforrepliesandforwards EDITTEXT
    VALUENAME ReplySignature
    END PART
    EXPLAIN !!L_SignatureChoose
    END POLICY
    END CATEGORY
    END CATEGORY
    _______________________________________________
    4. Navigate to the very bottom of the file and copy the following text there (again, between the lines)

    _______________________________________________
    L_Signature=”Signature”
    L_Disablesignaturesfornewmessages=”Disable signatures for new messages”
    L_Disablesignaturesforrepliesandforwards=”Disable signatures for replies and forwards”
    L_SignatureChoose=”Choose Signature”
    L_Signatureforrepliesandforwards=”Signature for replies and forwards
    L_Signaturefornewmessages=”Signature for new messages
    _______________________________________________

    Add the template to your group policies the same way as Office 11 described on this site.

    Tested and working

  39. Hi,
    I emailed this to you but am copying it here too:

    I am attempting to build an auto sig script for Outlook 2007 similar to what you posted on wordpress.com. Everything works great except for the registry keys. I cant for the life me figure out how to make the binary code for my sig files named “common”. I even manually set it in outlook, checked it and then programmed the script to enter the same thing and it keeps coming out wrong. No matter what I enter, I cannot get it to put in the 00’s. Examples below:

    Correct value created by outlook:

    Value 10
    Name: New Signature
    Type: REG_BINARY
    Data:
    00000000 63 00 6f 00 6d 00 6d 00 – 6f 00 6e 00 00 00 c.o.m.m.o.n…

    What I get when I enter the same value into the script:

    Value 0
    Name: New Signature
    Type: REG_BINARY
    Data:
    00000000 63 2e 6f 2e 6d 2e 6d 2e – 6f 2e 6e 2e 2e 2e c.o.m.m.o.n…

    How script is written:

    RegWrite (“HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\profile\9375CFF0413111d3B88A00104B2A66760000001”, “New Signature”, “REG_BINARY”, “c.o.m.m.o.n…”)

    Can you point me the right direction? I know its gotta be something really simple and stupid. I would appreciate it.

  40. Fantastic script – you have saved me a lot of time!

    Made a slight addition to add our company logo to the HTML sig.
    Insert the line below to copy the logo to the same directory as the sig files (the logo will need to be in the same dir as the AU3 file):

    FileInstall(“logo.jpg”, $sigpath & “\logo.jpg”,1)

    then in the HTML sig, reference to the image with the location “./logo.jpg”

  41. I’m having trouble compliing a script into an exe.

    Everytime I try to compile it comes up with the the erro ‘Error adding file: sig.html’

    All the files are in the same directory as the AU3 script.

    I am a complete newbie when it comes to this kind of thing, so any simple explanations would be appreciated.

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s