I am trying to deploy a custom registry entry which I exported from a test machine. It looks like below. I came across THIS similar request on another site, but I couldn't make it to work.
"TextFontSimple"=hex:3c,00,00,00,1f,00,00,f8,00,00,00,40,dc,00,00,00,00,00,00,\ 00,00,00,00,ff,00,31,43,6f,75,72,69,65,72,20,4e,65,77,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
As per the other solution, my PS command below, throws error."A parameter cannot be found that matches parameter name"
Set-ItemProperty -Path "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\MailSettings" -Name "TextFontSimple" -PropertyType Binary -Value ([byte[]] (0x3c,0x00,0x00,0x00,0x1f....0x00))
Any ideas?
====EDIT=====
The key & value already exists. When I use Get-ItemProperty
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\MailSettings
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common
PSChildName : MailSettings
PSProvider : Microsoft.PowerShell.Core\Registry
TextFontSimple : {60, 0, 0, 0...}
To figure out what went wrong with the direct registry setting approach, you'll need to provide more information about what you attempted and what went wrong.
For the powershell approach, you seem to be confusing
New-ItemProperty
andSet-ItemProperty
. When creating a new value, you can set the type. When modifying an existing value, you cannot; this is true of all methods of modifying the Windows registry, and it's the reason that your-PropertyType
parameter is causing the command to error.If the value already exists, but isn't set right:
If it doesn't exist:
More than likely the key you are trying to set doesn't exist yet. Try using new-itemproperty instead of set-itemproperty