if im reading the instructions right the only thing i have to do is change this
Code:
; define static data
; ======================================================================
; This is the ONE piece of user defined data that must be customized.
; ======================================================================
$RootPath = '\\filserver\netlogon\emailsigs\'
; ======================================================================
$RootPath = '.\' ; for debugging
; define the location & name of the configuration file
$CfgFile = $RootPath + 'config.ini'
i have made a file called config.ini and a file called Template.ini copy pasted the text from under The Config File og The Template File and placed the files in \\filserver\netlogon\emailsigs\ but im not sure that is the way to do it is there any more i have to do ?
#194508 - 2009-06-3007:21 PMRe: Dynamic Outlook Signatures
[Re: graesdal]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
You need to create an HTML file for the template, not an INI file. The INI file must be called MAILSIG.INI. You also need to get rid of the second
Code:
$RootPath = '.\' ; for debugging
line as it is only for debugging in the local directory!
For example, if you have this section in your MAILSIG.INI file
Code:
[Corporate]
Format=corp.htm
Image=corplogo.jpg
you should have the corresponding CORP.HTM template and CORPLOGO.JPG image file in that folder as well. The name of the section in the INI File corresponds to the OU name. It defines the name of the template and image files to use. Image files can be any supported format, but the template should be a .HTM file and have the HTML content as shown in the example. (ie - any valid, basic HTML code.)
I see you also changed the config file name to config.ini - not recommended!
Glenn
_________________________ Actually I am a Rocket Scientist!
i still dont get it. This is how it looks like now but still no signature all i get is a display of the signature file in the console
Script
Code:
; define static data
; ======================================================================
; This is the ONE piece of user defined data that must be customized.
; ======================================================================
$RootPath = '\\filserver\netlogon'
; ======================================================================
;RootPath = '.\' ; for debugging
; define the location & name of the configuration file
$CfgFile = $RootPath + 'mailsig.ini'
In \\filserver\netlogon i have spacer.gif, default.htm and mailsig.ini
<!--
template for email signature - this file is used to auto-generate a signature.htm file
- DO NOT ARBITRARILY MODIFY THIS FILE
-->
<html>
<head></head>
<body>
<!--
one row by two column table with image (if any) on left, text info on right
any &XX& replaceable field that does not have data will be removed, thus should be on separate line(s)
-->
<table border="0">
<tr>
<td>
&IMG&
</td>
<td>
<font face="arial" size="3">
<b>&FULLNAME&</b>
/ &TITLE&
<hr>
</font><font face="arial" size="2">
&COMPANY&<br>
&DEPARTMENT&<br>
&ADDRESS&<br>
&CITY&,
&STATE&
&POSTALCODE& <br>
&PHONENO&<br>
&FAXNO& (Fax)<br>
&CELLNO& (Cell)<br>
&WEBURL&<br>
</font>
</td>
</tr>
</table>
</body>
</html>
#194521 - 2009-07-0101:39 PMRe: Dynamic Outlook Signatures
[Re: graesdal]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
First off.. let's run the following script. Open and run from a command prompt - kix32 userdn.kix. Then copy the resulting DN string from the screen & post it back here. We need to see if you're defining the OU offset properly.
Next, the MAILSIG.INI is an example - you need to customize it based on the OU or Department - OR - simply define the COMMON section properly if everyone is to get the same signature. SPACER.GIF is a 1x1 pixel transparent image, probably not what you want. Put your company logo into the folder and define the name in the COMMON section's IMAGE value. If you don't use an image, leave it the way you have it.
Finally, run the script from a command prompt - NOT by double-clicking or drag & drop methods. These will prevent you from seeing the diagnostic or error messages! Then, after running the CreateMailSig script (from a command prompt), CD to %APPDATA%\Microsoft\Signatures and verify that the signature files have been created there.
Oh, and since the signature file is created in HTML, go into the Outlook properties and make sure that the default message format is HTML and not RTF or TEXT.
Glenn
_________________________ Actually I am a Rocket Scientist!
#194522 - 2009-07-0101:50 PMRe: Dynamic Outlook Signatures
[Re: Glenn Barnas]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Oh - one other thing comes to mind after re-reading your post. The version that's posted in the vault works, but there were a few error conditions that it did not deal with. One is when the user's SIGNATURES folder does not exist - it simply displays the HTM file on the screen. I missed that in the original code because that was also a debugging option.
For testing, open a command prompt and CD to %APPDATA%\Microsoft - verify that the Signatures subfolder exists, and create it if it doesn't. If that fixes the problem, you can add the MD %APPDATA$\Microsoft\Signatures command to the script, just before the files are written.
We will be releasing an updated version on our web site in a few weeks. Not only does V1.4 correct this issue, but it includes a tool that provides the user with the ability to customize their signature - "James" can become "Jim", and they can add their Cell #, for example. There is also a GUI tool to manage the MAILSIG.INI configuration, validating image size and dimensions, and simplifying the use of Departments and Divisions.
Glenn
_________________________ Actually I am a Rocket Scientist!
#194527 - 2009-07-0104:05 PMRe: Dynamic Outlook Signatures
[Re: graesdal]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
This info helps you identify the OU Offset value if you will be using specific signatures for different OUs.
Does the Signature.HTM file exist in your Signatures subfolder? If it does, the script is working, but your Outlook isn't recognizing the configuration change. Some versions of outlook won't update unles it is restarted. Verify that the default message format is HTML, and that the signatures are set to Signature for new emails.
If the files are not being created, let me know, and we'll proceed with some script debugging.
Glenn
Edited by Glenn Barnas (2009-07-0105:15 PM)
_________________________ Actually I am a Rocket Scientist!
#194539 - 2009-07-0203:00 AMRe: Dynamic Outlook Signatures
[Re: masken]
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11628
Loc: CA
Well actually attaching images vs referencing them on a remote Web server can really save space on an Exchange mail store.
ImagMagick is also not a very secure method to use on a Windows Web Server due to it requiring excess modify rights to areas of Windows that it shouldn't really have. Works fine if all done in-house though on a local box.
its working now since i have a danish version of office my signature folder is \Microsoft\Signaturer\signature.htm i only have one problem how do i force the users to use the signatures generated form the script, right now if the user has a signature outlook does not change to the one generated by kix
#194546 - 2009-07-0211:50 AMRe: Dynamic Outlook Signatures
[Re: graesdal]
MartMart KiX Supporter
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Delete everything in the folder before creating and setting the new signature.
The script below is part of our (to be implemented) logon script. it deletes all files and folder from the signature folder if the signature folder exists. If it does not exist it creates the folder and next time the delete part will kick in. The script below requires the DirPlus() UDF. You should check if the signature folder path fits your setup.
Code:
$signaturefolder = $appdata + "\Microsoft\Signatures\"
$folderlist = dirplus($signaturefolder, "/ad")
If Exist ($signaturefolder)
Del $signaturefolder + "*.*"
For Each $folder in $folderlist
RD $folder /s
Next
Else
MD $signaturefolder
EndIf
#194548 - 2009-07-0201:36 PMRe: Dynamic Outlook Signatures
[Re: graesdal]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
The new version of the code uses a function called OutlookSignature() to get/set/delete the signature settings. You can download that UDF from my web site in the Resources section. You will need to call it once for new email and a second time for replies/forwards unless you use the same signature for both. We use a text sig for replies, and only use the image for new messages. Be sure to also download and include the dependent string conversion UDFs!
Make the call to the UDF right after the signature files are created.
Our new code can optionally delete all prior signatures before creating the company standard sigs. This was made an option since some executives use two signatures, depending on which division they need to represent. The second sig is created manually for them, so we can't just delete it. If you choose to delete prior sigs, do it before anything else is created.
Glenn
PS - Would you like to try version 1.4 and assist in the process to support internationalization? The code is solid and deployed in several sites and over 4000 desktops, but is US-English only at this time. Send me a PM with your email if you are interested.
_________________________ Actually I am a Rocket Scientist!
#194549 - 2009-07-0201:41 PMRe: Dynamic Outlook Signatures
[Re: masken]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
The one problem I see with this approach, from a strictly mail standpoint, is that you may not have enough control over the image size. Large images, generally over 32K in fact, can trigger SPAM filters on many inbound mail servers. This can delay or prevent delivery of email.
We keep our images small, and the HTML or text signature is insignificant. Of course, it limits the text portion to use of universally available fonts, but this is rarely an issue.
Glenn
_________________________ Actually I am a Rocket Scientist!
ok so now this script is working for me and alot of my users are using it i have one problem with one of my users he has 2 computers both with windows xp and office the script works fine on one of his computer however one the other the kix runs and generates a signature.htm in the signature folder but the file is emty
#194606 - 2009-07-0703:39 PMRe: Dynamic Outlook Signatures
[Re: graesdal]
MartMart KiX Supporter
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Looks like the script has some issues getting data from AD one the system where the signature is empty.
It can be useful to make a copy of the script for testing, put some debugging lines in it to show the data from AD on the screen and run the script manually on that specific system.
this issue is with 1.1 i only use 1.5 for testing on my own system. if i make a debug and show the output of the signature in the console it shows all the information from ad but still the signature.htm file is emty on one of his computers
the script 1.1 runs ok now i only have one problem when i reply somone how writs to me in plain text or rtf there is no signature i know that this script is html but i really want some kind of signature (just name and address) in my plain text mails. can i do something that writes something in my signature.txt and signature.rtf