Reputation: 21
In the context of a project, I have to succeed, with a code in PowerShell, to activate the "Print background colors and images" parameter for all users. For the moment, I can activate it for the current user with the following command:
Set-ItemProperty -Path 'HCKU:\Software\Microsoft\Internet Explorer\PageSetup\' _Name 'Print_Background' -Value YES _Force
Unfortunately, and logically, this only affects the current user and not all other users as desired.
I'm still not very comfortable with registry keys. I understand that I have to use a HKEY_LOCAL_MACHINE. But I haven't figured out how to access this parameter using such a key. I tried to replace 'HKCU' by 'HKLM', as recommended by some people, but it returns me an error.
Upvotes: 0
Views: 525
Reputation: 11335
If you want to enable the option Print background colors and images in the page setup of the IE browser for all users then you need to create registry on location below.
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main
Name: Print_Background
Value: yes
You can try to modify your script and try to check whether it works for you or not.
Upvotes: 2