[GH-ISSUE #27] Outlook 2013 registry keys and embedded images (original title: 'Nothing happens') #8

Closed
opened 2026-02-27 20:30:46 +03:00 by kerem · 34 comments
Owner

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

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
kerem 2026-02-27 20:30:46 +03:00
Author
Owner

@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

<!-- gh-comment-id:997966674 --> @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
Author
Owner

@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.

<!-- gh-comment-id:997968994 --> @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.
Author
Owner

@Imaginos commented on GitHub (Dec 20, 2021):

log.txt
Here's the log (PS transcript) with some data modified for security reasons :)

<!-- gh-comment-id:998014902 --> @Imaginos commented on GitHub (Dec 20, 2021): [log.txt](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7746205/log.txt) Here's the log (PS transcript) with some data modified for security reasons :)
Author
Owner

@GruberMarkus commented on GitHub (Dec 20, 2021):

Outlook is installed on your client, but not a single mailbox is configured. Is this intended?

  • It should not be a problem though, as you run the script in default configuration and it still tries to set signatures and OOF messages in Outlook Web and to create a copy of the signatures in the file system.
  • Please don't add an Outlook profile, as you may have found a logical error that only happens in this exact case.

Please perform the following checks and let me know the result.

Check 1: Open Outlook Web and check if a signature has been set.

  • According to the log, a signature for new mails has been set, the content must equal the template 'MyCompany external English formal.docx'.

Check 2: Open Outlook Web and check if Out of Office auto reply messages have been set.

  • According to the log, an internal and an external reply message has been configured.
    • The internal message must equal the template 'OOF internal.[Internal].docx'.
    • The external message must equal the template 'OOF external.[External].docx'

Check 3: Are there any files in 'C:\Users\My_Name\Documents\Outlook Signatures'?

  • If there are no files, you have found a bug that happens when no Outlook profile is configured.

Check 4: Run Set-OutlookSignatures with the parameters '-SimulateUser Your_Domain\Your_Name, -SimulateMailboxes My_Name@dummy_domain.fr'.

  • Are there now any files in 'C:\Users\My_Name\Documents\Outlook Signatures'?

If my gut feeling is right, checks 1, 2 and 4 will be positive and check 3 will be negative.

<!-- gh-comment-id:998033277 --> @GruberMarkus commented on GitHub (Dec 20, 2021): ### Outlook is installed on your client, but not a single mailbox is configured. Is this intended? - It should not be a problem though, as you run the script in default configuration and it still tries to set signatures and OOF messages in Outlook Web and to create a copy of the signatures in the file system. - Please don't add an Outlook profile, as you may have found a logical error that only happens in this exact case. Please perform the following checks and let me know the result. ### Check 1: Open Outlook Web and check if a signature has been set. - According to the log, a signature for new mails has been set, the content must equal the template 'MyCompany external English formal.docx'. ### Check 2: Open Outlook Web and check if Out of Office auto reply messages have been set. - According to the log, an internal and an external reply message has been configured. - The internal message must equal the template 'OOF internal.[Internal].docx'. - The external message must equal the template 'OOF external.[External].docx' ### Check 3: Are there any files in 'C:\Users\My_Name\Documents\Outlook Signatures'? - If there are no files, you have found a bug that happens when no Outlook profile is configured. ### Check 4: Run Set-OutlookSignatures with the parameters '-SimulateUser Your_Domain\Your_Name, -SimulateMailboxes My_Name@dummy_domain.fr'. - Are there now any files in 'C:\Users\My_Name\Documents\Outlook Signatures'? If my gut feeling is right, checks 1, 2 and 4 will be positive and check 3 will be negative.
Author
Owner

@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 :/

<!-- gh-comment-id:998056098 --> @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](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7746465/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 :/
Author
Owner

@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.

<!-- gh-comment-id:998058555 --> @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.
Author
Owner

@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 !

<!-- gh-comment-id:998069497 --> @Imaginos commented on GitHub (Dec 20, 2021): [simulation2.txt](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7746567/simulation2.txt) Done and still no file created. The day is over for me now (France), we'll carry on tomorrow ;) Thanx !
Author
Owner

@GruberMarkus commented on GitHub (Dec 20, 2021):

I have identified two problems:

  • Problem 1 is that the script does not detect mailboxes you have configured in Outlook.
  • Problem 2 is triggered by problem 1. As no Outlook configuration is detected, the script assumes that is has to set signatures for the current user's mailbox (interesting for environments where only Outlook Web is used, or to have the user's personal signatures already available when Outlook is started the first time). The temporary folder containing signatures is not handled correctly.

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:

  • 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 '@.*')) }
    • We might see that there is no key 'Identity Eid', or it is empty
<!-- gh-comment-id:998169139 --> @GruberMarkus commented on GitHub (Dec 20, 2021): I have identified two problems: - Problem 1 is that the script does not detect mailboxes you have configured in Outlook. - Problem 2 is triggered by problem 1. As no Outlook configuration is detected, the script assumes that is has to set signatures for the current user's mailbox (interesting for environments where only Outlook Web is used, or to have the user's personal signatures already available when Outlook is started the first time). The temporary folder containing signatures is not handled correctly. 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](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7747263/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: - 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 '*@*.*')) } - We might see that there is no key 'Identity Eid', or it is empty
Author
Owner

@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 :)

<!-- gh-comment-id:998757687 --> @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](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7755408/alpha.txt) Anyway, and it's the most important, the files have been created :)
Author
Owner

@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:

Get-ItemProperty "hkcu:\Software\Microsoft\Office\*\Outlook\Profiles\*\*\*" -ErrorAction SilentlyContinue | Where-Object { (($_.'Account Name' -like '*@*.*')) } 
<!-- gh-comment-id:998783613 --> @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: ``` Get-ItemProperty "hkcu:\Software\Microsoft\Office\*\Outlook\Profiles\*\*\*" -ErrorAction SilentlyContinue | Where-Object { (($_.'Account Name' -like '*@*.*')) } ```
Author
Owner

@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.

<!-- gh-comment-id:998798467 --> @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.
Author
Owner

@GruberMarkus commented on GitHub (Dec 21, 2021):

The PowerShell got changed by markdown formatting. The correct command is:

Get-ItemProperty "hkcu:\Software\Microsoft\Office\*\Outlook\Profiles\*\*\*" -ErrorAction SilentlyContinue | Where-Object { (($_.'Account Name' -like '*@*.*')) } 
<!-- gh-comment-id:998799932 --> @GruberMarkus commented on GitHub (Dec 21, 2021): The PowerShell got changed by markdown formatting. The correct command is: ``` Get-ItemProperty "hkcu:\Software\Microsoft\Office\*\Outlook\Profiles\*\*\*" -ErrorAction SilentlyContinue | Where-Object { (($_.'Account Name' -like '*@*.*')) } ```
Author
Owner

@Imaginos commented on GitHub (Dec 21, 2021):

Yes, that's the one I used :)

<!-- gh-comment-id:998801204 --> @Imaginos commented on GitHub (Dec 21, 2021): Yes, that's the one I used :)
Author
Owner

@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:

  • Please check if it's not "15.0" but something different.
  • Is there something comparable in "HKCU\Software\Software\Wow6432Node..."?
<!-- gh-comment-id:998808658 --> @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: - Please check if it's not "15.0" but something different. - Is there something comparable in "HKCU\Software\Software\Wow6432Node\..."?
Author
Owner

@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.

<!-- gh-comment-id:998830423 --> @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.
Author
Owner

@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

<!-- gh-comment-id:998833170 --> @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
Author
Owner

@Imaginos commented on GitHub (Dec 21, 2021):

I deleted the post with the registry file, some data must remain confidential :)

<!-- gh-comment-id:998836040 --> @Imaginos commented on GitHub (Dec 21, 2021): I deleted the post with the registry file, some data must remain confidential :)
Author
Owner

@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.

$MailAddresses = @()

Get-ItemProperty "hkcu:\Software\Microsoft\Office\*\Outlook\Profiles\*\9375CFF0413111d3B88A00104B2A6676\*" -ErrorAction SilentlyContinue | Where-Object { ($_.'Account Name' -like "*@*.*") -or (($_.'Account Name' -join ",") -like "*,64,*,46,*") } | foreach {
    if ($_.'Account Name' -like '*@*.*') {
        $MailAddresses += ($_.'Account Name').tolower()
    } else {
        $MailAddresses += (($_.'Account Name' -join ',').Split(',', [System.StringSplitOptions]::RemoveEmptyEntries) | Where-Object { $_ -gt '0' } | ForEach-Object { [char][int]"$($_)" }) -join ''
    }
}

$MailAddresses
<!-- gh-comment-id:998852951 --> @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. ``` $MailAddresses = @() Get-ItemProperty "hkcu:\Software\Microsoft\Office\*\Outlook\Profiles\*\9375CFF0413111d3B88A00104B2A6676\*" -ErrorAction SilentlyContinue | Where-Object { ($_.'Account Name' -like "*@*.*") -or (($_.'Account Name' -join ",") -like "*,64,*,46,*") } | foreach { if ($_.'Account Name' -like '*@*.*') { $MailAddresses += ($_.'Account Name').tolower() } else { $MailAddresses += (($_.'Account Name' -join ',').Split(',', [System.StringSplitOptions]::RemoveEmptyEntries) | Where-Object { $_ -gt '0' } | ForEach-Object { [char][int]"$($_)" }) -join '' } } $MailAddresses ```
Author
Owner

@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.

<!-- gh-comment-id:999098777 --> @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](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7758352/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.
Author
Owner

@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).

<!-- gh-comment-id:999605150 --> @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).
Author
Owner

@Imaginos commented on GitHub (Dec 22, 2021):

Hi Markus

I've just tested the new version and here's what :

  • htm, rtf and txt files are created !
    BUT !
  • Instead of creating files in 'C:\Users\My_Name\AppData\Roaming\Microsoft\Signatures'
    they are created in a new folder : 'C:\Users\My_Name\AppData\Roaming\Microsoft\Signatures Signatures'
  • the subfolder needed for the picture in the Signatures folder doesn't exist, thus signature as no image.
  • I got the message : Error setting Outlook Web signature
<!-- gh-comment-id:999621460 --> @Imaginos commented on GitHub (Dec 22, 2021): Hi Markus I've just tested the new version and here's what : - htm, rtf and txt files are created ! BUT ! - Instead of creating files in 'C:\Users\My_Name\AppData\Roaming\Microsoft\Signatures' they are created in a new folder : 'C:\Users\My_Name\AppData\Roaming\Microsoft\Signatures Signatures' - the subfolder needed for the picture in the Signatures folder doesn't exist, thus signature as no image. - I got the message : Error setting Outlook Web signature
Author
Owner

@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.

<!-- gh-comment-id:999629720 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:999643531 --> @Imaginos commented on GitHub (Dec 22, 2021): Transcript : [2.5b1.txt](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7763368/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.
Author
Owner

@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

<!-- gh-comment-id:999648475 --> @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
Author
Owner

@Imaginos commented on GitHub (Dec 22, 2021):

Capture
Here's a capture of the result in Outlook of the 'Test all signature replacement variables.docx'

<!-- gh-comment-id:999652152 --> @Imaginos commented on GitHub (Dec 22, 2021): ![Capture](https://user-images.githubusercontent.com/74036/147114523-d076ba7b-eabf-4c86-b90c-487505489a08.PNG) Here's a capture of the result in Outlook of the 'Test all signature replacement variables.docx'
Author
Owner

@GruberMarkus commented on GitHub (Dec 22, 2021):

Folder 'Signatures Signatures'
Please send me the output of the following PowerShell commands:

$OutlookRegistryVersion = "15.0"
$x = (Join-Path -Path ($env:AppData) -ChildPath 'Microsoft')
$x
$y = (Get-ItemProperty "hkcu:\software\microsoft\office\$OutlookRegistryVersion\common\general" -ErrorAction SilentlyContinue).'Signatures'
$y
test-path (join-path -path $x -childpath $y) -type container

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:

  1. Close Outlook
  2. Create the following registry key:
    • Path: 'hkcu:\Software\Microsoft\Office\15.0\Outlook\Options\Mail'
    • Key name: 'Send Pictures With Document'
    • Type: DWord (32)
    • Value: 1
  3. Start Outlook and check if the pictures are displayed now
<!-- gh-comment-id:999792658 --> @GruberMarkus commented on GitHub (Dec 22, 2021): **Folder 'Signatures Signatures'** Please send me the output of the following PowerShell commands: ``` $OutlookRegistryVersion = "15.0" $x = (Join-Path -Path ($env:AppData) -ChildPath 'Microsoft') $x $y = (Get-ItemProperty "hkcu:\software\microsoft\office\$OutlookRegistryVersion\common\general" -ErrorAction SilentlyContinue).'Signatures' $y test-path (join-path -path $x -childpath $y) -type container ``` **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](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7764623/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: 1. Close Outlook 2. Create the following registry key: - Path: 'hkcu:\Software\Microsoft\Office\15.0\Outlook\Options\Mail' - Key name: 'Send Pictures With Document' - Type: DWord (32) - Value: 1 3. Start Outlook and check if the pictures are displayed now
Author
Owner

@GruberMarkus commented on GitHub (Dec 23, 2021):

Please ignore the post above.

I now have temporary access to Office 2013 again.

  • The problem with setting default signatures is solved, so there should no longer be a problem when connecting to Outlook Web to set the signature there.
  • The embedded image problem requires a lot of work, and I probably can only provide a test version in two weeks or so.

I just can't reproduce the "Signatures Signatures" folder problem.
Please send me the output of the following PowerShell commands:

$OutlookRegistryVersion = "15.0"
$x = (Join-Path -Path ($env:AppData) -ChildPath 'Microsoft')
$x
$y = (Get-ItemProperty "hkcu:\software\microsoft\office\$OutlookRegistryVersion\common\general" -ErrorAction SilentlyContinue).'Signatures'
$y
test-path (join-path -path $x -childpath $y) -type container
<!-- gh-comment-id:999978824 --> @GruberMarkus commented on GitHub (Dec 23, 2021): Please ignore the post above. I now have temporary access to Office 2013 again. - The problem with setting default signatures is solved, so there should no longer be a problem when connecting to Outlook Web to set the signature there. - The embedded image problem requires a lot of work, and I probably can only provide a test version in two weeks or so. I just can't reproduce the "Signatures Signatures" folder problem. Please send me the output of the following PowerShell commands: ``` $OutlookRegistryVersion = "15.0" $x = (Join-Path -Path ($env:AppData) -ChildPath 'Microsoft') $x $y = (Get-ItemProperty "hkcu:\software\microsoft\office\$OutlookRegistryVersion\common\general" -ErrorAction SilentlyContinue).'Signatures' $y test-path (join-path -path $x -childpath $y) -type container ```
Author
Owner

@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'

<!-- gh-comment-id:1000129393 --> @Imaginos commented on GitHub (Dec 23, 2021): Result : [outlook.txt](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7767821/outlook.txt) If the only issue is the double 'signatures' folder, I can overcome it with the param 'AdditionalSignaturePath'
Author
Owner

@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.

<!-- gh-comment-id:1000537103 --> @GruberMarkus commented on GitHub (Dec 23, 2021): Please test the attached version: [Set-OutlookSignatures.ps1.txt](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7771486/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 '<signature name>.files' subfolder ("connected files" feature in Windows). This should solve your problem with embedded images and Outlook 2013.
Author
Owner

@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

<!-- gh-comment-id:1000724641 --> @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](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7773463/files.txt)
Author
Owner

@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: DoNotEmbedImagesInHTML becomes EmbedImagesInHTML. Don't forget to update your execution parameters from DoNotEmbedImagesInHTML true to EmbedImagesInHTML false when switching from the attached test version to a newer version.

<!-- gh-comment-id:1000858507 --> @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](https://github.com/GruberMarkus/Set-OutlookSignatures/files/7774594/Set-OutlookSignatures.ps1.txt) Merry Christmas! PS: Starting with v2.5.0-beta2, the parameter name will be different from the version attached: `DoNotEmbedImagesInHTML` becomes `EmbedImagesInHTML`. Don't forget to update your execution parameters from `DoNotEmbedImagesInHTML true` to `EmbedImagesInHTML false` when switching from the attached test version to a newer version.
Author
Owner

@Imaginos commented on GitHub (Dec 27, 2021):

Hi Markus.
I'll be testing it this morning :)

<!-- gh-comment-id:1001430854 --> @Imaginos commented on GitHub (Dec 27, 2021): Hi Markus. I'll be testing it this morning :)
Author
Owner

@Imaginos commented on GitHub (Dec 27, 2021):

Well that's fine by me.

  • Files are correctly created for sign & OOF
  • Signatures & OOF are correctly send in web outlook
<!-- gh-comment-id:1001440493 --> @Imaginos commented on GitHub (Dec 27, 2021): Well that's fine by me. - Files are correctly created for sign & OOF - Signatures & OOF are correctly send in web outlook
Author
Owner

@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 true to EmbedImagesInHTML false when 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.

<!-- gh-comment-id:1001483047 --> @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](https://github.com/GruberMarkus/Set-OutlookSignatures/releases/tag/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 true` to `EmbedImagesInHTML false` when 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](https://github.com/GruberMarkus/Set-OutlookSignatures/releases/tag/v2.5.0-beta2) and is therefore closed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#8
No description provided.