mirror of
https://github.com/Set-OutlookSignatures/Set-OutlookSignatures.git
synced 2026-04-26 10:45:52 +03:00
[GH-ISSUE #27] Outlook 2013 registry keys and embedded images (original title: 'Nothing happens') #8
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Imaginos on GitHub (Dec 20, 2021).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/27
Originally assigned to: @Imaginos, @GruberMarkus on GitHub.
Hi
As I said on reddit's thread I can't get the script working.
As you suggested, I ran it without any parameter and no file is created (neither in the user's signature folder nor in documents subfolder) even if it pretends so at the end.
I see no error in the console, the replacement variables seem OK but there are some warnings :
'MyCompany external English formal Legal.[defaultNew] [Domain Legal-Group].docx'
Group specific signature
[Domain Legal-Group] = Domain\Legal-Group: Not found, please check
Default signature for new mails
'MyCompany external English formal Marketing Christmas 2021.[Domain Marketing-Group] [202112150000-202112262359].docx'
Time based signature
[202112150000-202112262359]: Current DateTime in range
Current DateTime is in range of at least one DateTime tag, using signature
Group specific signature
[Domain Marketing-Group] = Domain\Marketing-Group: Not found, please check
'MyCompany external English formal Marketing New Year 2022.[Domain Marketing-Group] [202112270000-202201062359].docx'
Time based signature
[202112270000-202201062359]: Current DateTime out of range
Current DateTime is not in range of any DateTime tag, ignoring signature
'MyCompany external English formal Marketing.[Domain Marketing-Group].docx'
Group specific signature
[Domain Marketing-Group] = Domain\Marketing-Group: Not found, please check
'MyCompany external English formal.[defaultNew].docx'
Common signature
Further information
OS : Windows 10
office : 2013 std
PS in full language mode
Thanx for helping ;)
Tom
@Imaginos commented on GitHub (Dec 20, 2021):
I notice another warning at the beginning :
Get AD properties of currently logged in user and assigned manager @2021-12-20T15:07:02+01:00@
Currently logged in user
User's mailbox not found in Outlook profiles, but Outlook Web signature and/or OOF message should be set. Adding Mailbox dummy entry.
CN=INFO_OK,OU=INFO_OK,OU=INFO_OK,DC=INFO_OK,DC=INFO_OK
Manager of currently logged in user
@GruberMarkus commented on GitHub (Dec 20, 2021):
Hi Tom,
please save the full output of Set-OutlookSignatures as text file and add it to this issue for further analysis.
@Imaginos commented on GitHub (Dec 20, 2021):
log.txt
Here's the log (PS transcript) with some data modified for security reasons :)
@GruberMarkus commented on GitHub (Dec 20, 2021):
Outlook is installed on your client, but not a single mailbox is configured. Is this intended?
Please perform the following checks and let me know the result.
Check 1: Open Outlook Web and check if a signature has been set.
Check 2: Open Outlook Web and check if Out of Office auto reply messages have been set.
Check 3: Are there any files in 'C:\Users\My_Name\Documents\Outlook Signatures'?
Check 4: Run Set-OutlookSignatures with the parameters '-SimulateUser Your_Domain\Your_Name, -SimulateMailboxes My_Name@dummy_domain.fr'.
If my gut feeling is right, checks 1, 2 and 4 will be positive and check 3 will be negative.
@Imaginos commented on GitHub (Dec 20, 2021):
First of all - As a matter of fact, I don't understand why it is said that no mailbox is configured.
Before trying the script, Outlook has been working and there is already an Exchange mailbox configured.
1-2
OK for the signs in web Outlook
3
as expected, there's no file in the folder
4
simulation.txt
Here's the simulation transcript
I don't understand why it cannot find my user in the AD...
In both parameters (Your_Name and My_Name) I use my login (as it is the same as my mail's first part).
Unfortunately, there are still no file in the signature folder :/
@GruberMarkus commented on GitHub (Dec 20, 2021):
Please run the simulation again, using the NETBIOS name of your domain instead of the DNS name. Alternatively, you can use the user's UPN.
@Imaginos commented on GitHub (Dec 20, 2021):
simulation2.txt
Done and still no file created.
The day is over for me now (France), we'll carry on tomorrow ;)
Thanx !
@GruberMarkus commented on GitHub (Dec 20, 2021):
I have identified two problems:
I want to solve problem 2 first, as it is not the root cause but still relevant.
Please try the attached script version (it's an early alpha version of the upcoming version 2.5.0): Set-OutlookSignatures.ps1.txt
Even when problem 1 is still there, you should find updated signature files in 'C:\Users\My_Name\Documents\Outlook Signatures' and 'C:\Users\My_Name\AppData\Roaming\Microsoft\Signatures'.
As soon as we have solved problem 2, we will go on with problem 1.
The first step will be:
@Imaginos commented on GitHub (Dec 21, 2021):
Hi Markus !
I passed the alpha version.
I saw the files being created in both folders but... At the end of the script the folder 'C:\Users\My_Name\AppData\Roaming\Microsoft\Signatures' has been deleted by the script :D, leaving with only 'C:\Users\My_Name\AppData\Roaming\Microsoft'.
Here's the transcript, you'll see 2 errors for "split-path" because "Path" parameter is null.
alpha.txt
Anyway, and it's the most important, the files have been created :)
@GruberMarkus commented on GitHub (Dec 21, 2021):
That's good news.
Now let us solve problem 1: The script does not detect the mailboxes you have configured in Outlook.
Is Outlook configured to use the default protocol (RPC/http, MAPI/http, Outlook Anywhere) to connect to your mailbox, or have you configured a specific protocol (ActiveSync, POP, IMAP)?
Please send the results of the following PowerShell command: Get-ItemProperty "hkcu:\Software\Microsoft\Office*\Outlook\Profiles***" -ErrorAction SilentlyContinue | Where-Object { (($_.'Account Name' -like '@.*')) }
Edit 2021-12-21 14:46
The PowerShell got changed by markdown formatting. The correct command is:
@Imaginos commented on GitHub (Dec 21, 2021):
Well Outlook is configured the simpliest way : auto-config by our exchange 2016 server using our AD (it's a simple structure with only one domain).
The Get-ItemProperty (the good one) returns nothing.
@GruberMarkus commented on GitHub (Dec 21, 2021):
The PowerShell got changed by markdown formatting. The correct command is:
@Imaginos commented on GitHub (Dec 21, 2021):
Yes, that's the one I used :)
@GruberMarkus commented on GitHub (Dec 21, 2021):
Well, that's really strange because this is where Outlook stores profile information since version 2013 (15.0).
Do you have a registry key HKCU\Software\Software\Microsoft\Office\15.0\Outlook\Profiles? If yes, please let me have a complete export.
If no:
@GruberMarkus commented on GitHub (Dec 21, 2021):
All the relevant keys are there, but my query still fails.
The reason is the key
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\00000002\Account Name: In all Outlook environments I have seen to far, it is a clear text field of type Reg_SZ. In you export, it is of Type Reg_Binary and contains the text as hex values.I will think about a solution and come back to you. As I am currently preparing some delicate code dependency changes for v2.5.0, a day or two may pass until I can provide you with a test version.
@Imaginos commented on GitHub (Dec 21, 2021):
Yes, it's odd...
Anyway, i'm here and waiting and I'm glad to help.
See ya.
Tom
@Imaginos commented on GitHub (Dec 21, 2021):
I deleted the post with the registry file, some data must remain confidential :)
@GruberMarkus commented on GitHub (Dec 21, 2021):
Please let me know if the following PowerShell scripts works on your system.
It should output the primary SMTP address of all mailboxes configured across all Outlook profiles.
On my system, it works with my Outlook 2016 configuration (Reg_SZ) and with your registry export (Reg_Binary) at the same time.
It would be good if you test it not only with one mailbox, but with multiple configured mailboxes.
@GruberMarkus commented on GitHub (Dec 21, 2021):
Hi Tom,
the code dependency changes could be finished earlier than expected. Please try this early alpha of the upcoming version 2.5.0:
Set-OutlookSignatures.ps1.txt
It incorporates all the changes we discussed before, so it should now recognize all your mailboxes and correctly set signatures.
Please let me know if the alpha version works correctly or if there are any problems.
@GruberMarkus commented on GitHub (Dec 22, 2021):
Hi Tom,
v2.5.0-beta1 has just been released. It contains some new features and all fixes for the problems in this issue.
Please let me know if this beta solves the problems (if yes, I will close this issue).
@Imaginos commented on GitHub (Dec 22, 2021):
Hi Markus
I've just tested the new version and here's what :
BUT !
they are created in a new folder : 'C:\Users\My_Name\AppData\Roaming\Microsoft\Signatures Signatures'
@GruberMarkus commented on GitHub (Dec 22, 2021):
Folder "Signatures signatures"
Please provide the full script output for further debugging.
Picture subfolder
Set-OutlookSignatures creates single file htm signatures with embedded images, there is no subfolder needed.
Please provide the full script output along with the source template and resulting signature for further debugging.
Can you reproduce the problem with an Office version newer than 2013?
Error setting outlook Web Signature
Without the log, I can't help you here. The code onnecting to Outlook Web has not changed from v2.4.0 on, and it works fine in two Graph, a hybrid and an on-prem environment I have for testing.
@Imaginos commented on GitHub (Dec 22, 2021):
Transcript : 2.5b1.txt
Picture
Yes, I see the picture when I open the htm file in a browser, but within Outlook, there's an empty space with the text like "Impossible to display the linked picture. File must have been moved, etc."
And of course, if I send a mail with this sign, the reciever sees no image.
The embedded image is a png of 512x172 pixels.
Web signature
It is strange because with 2.4 script, it worked.
@Imaginos commented on GitHub (Dec 22, 2021):
About pictures
I tested the script without any parameters and it's the same issue with all the sample templates.
In Outlook, all signatures show red cross instead of pictures
@Imaginos commented on GitHub (Dec 22, 2021):
Here's a capture of the result in Outlook of the 'Test all signature replacement variables.docx'
@GruberMarkus commented on GitHub (Dec 22, 2021):
Folder 'Signatures Signatures'
Please send me the output of the following PowerShell commands:
Connection to Outlook Web
Setting the Outlook Web signature did not show an error in v2.4.0 because this version did not detect your Outlook profile and therefore used another mechanism to detect the signature to use in Outlook Web.
In your initial registry export, no default signatures were defined for your mailbox. In your newest log, default signatures for new e-mails and for replies and forwards have been defined.
v2.5.0-beta1 now detects your Outlook profile, and takes the default signature information from the registry. The keys in Outlook 2013 seem to be Reg_Binary instead of Reg_SZ, which leads to the problem: The registry keys are read but not converted to their string representation, and the following commands can't handle arrays instead of strings.
The opposite is true when the script tries to set the default signature values.
I don't have Office 2013 available here anymore, so please test the attached version: Set-OutlookSignatures.ps1.txt
Missing images
As the picture can be seen when you open the signature in a browser, the problem must be something specific to Outlook 2013.
Please try the following:
@GruberMarkus commented on GitHub (Dec 23, 2021):
Please ignore the post above.
I now have temporary access to Office 2013 again.
I just can't reproduce the "Signatures Signatures" folder problem.
Please send me the output of the following PowerShell commands:
@Imaginos commented on GitHub (Dec 23, 2021):
Result : outlook.txt
If the only issue is the double 'signatures' folder, I can overcome it with the param 'AdditionalSignaturePath'
@GruberMarkus commented on GitHub (Dec 23, 2021):
Please test the attached version:
Set-OutlookSignatures.ps1.txt
This version correctly handles Outlook 2013 registry entries, which have the same names but different encoding than newer Outlook versions.
This should solve your problem with setting default signatures in Outlook and Outlook Web.
Before running this version, please delete the "signatures signatures" folder and let me know if it gets recreated. Also let me know which files and folder are there (PowerShell:
get-childitem 'C:\Users\My_Login\AppData\Roaming\Microsoft\Signatures' -recurse)Run it with the new parameter '-DoNotEmbedImagesInHTML true', and send me the full script output.
With this parameter, images are not embedded into the HTML file but in a '.files' subfolder ("connected files" feature in Windows).
This should solve your problem with embedded images and Outlook 2013.
@Imaginos commented on GitHub (Dec 24, 2021):
Yes !
The files have been created at the right place (local and web outlook), signature is correctly activated in both and, using the new parameter '-DoNotEmbedImagesInHTML $true'.
All is perfect, I will now try to implement also OOF and think of the best way to use it in our SI.
Here's the powershell result for the files :
files.txt
@GruberMarkus commented on GitHub (Dec 24, 2021):
I made DoNotEmbedImagesInHTML compatible with UseHTMTemplates.
Even if you do not use UseHTMTemplates, please test with the attached version and let me know if this version can be released as v2.5.0-beta2 and if I can close this issue as solved.
Set-OutlookSignatures.ps1.txt
Merry Christmas!
PS: Starting with v2.5.0-beta2, the parameter name will be different from the version attached:
DoNotEmbedImagesInHTMLbecomesEmbedImagesInHTML. Don't forget to update your execution parameters fromDoNotEmbedImagesInHTML truetoEmbedImagesInHTML falsewhen switching from the attached test version to a newer version.@Imaginos commented on GitHub (Dec 27, 2021):
Hi Markus.
I'll be testing it this morning :)
@Imaginos commented on GitHub (Dec 27, 2021):
Well that's fine by me.
@GruberMarkus commented on GitHub (Dec 27, 2021):
Thank you very much for reporting this issue and actively contributing to it's solution!
v2.5.0-beta2 containing the fixes mentioned in this issue has just been released.
Don't forget to update your execution parameters from
DoNotEmbedImagesInHTML truetoEmbedImagesInHTML falsewhen switching from a test version provided in this thread to v2.5.0-beta2 or newer.This issue has been solved in v2.5.0-beta2 and is therefore closed.