Question How to disable "Let Windows manage my default printer" first time a user logs in?

Aug 7, 2019
1
1
10
I am a apprentice in the field of IT. I work at DTU (Denmarks Technical University). It is a quite big university, with numerous institutions. I am working in one of these institutions. All the institutions is centralized, under one head IT department, and i am working in a sub IT department. All the departments gets Windows 10 through SCCM. And as far as i am concerned, there is only one image, which is meant to fit all institutions. So i cannot change the image for my needs, i can only tweak it after it has been installed (if that's possible).

So when i make a new PC and install Windows 10, then i want, to set a default printer automatically. But only once.

The hurdle is this Windows setting function "Let Windows manage my default printer". I cannot figure out how to turn it off properly. I tried with GPO, but then every time the user logs in again, then it resets the policy. Which is a problem if a user actually wishes to have this setting turned on. Also i don't like the idea of pushing out a GPO affecting all PC's already on site! I only want to configure new PC's. Therefore i resolved to Powershell. With Powershell you can run a script containing two commands, does not even need admin rights. The first command install the printer. The second command sets the printer default. SO HERE IS THE PROBLEM. In order for the script to work you need to first disable the Windows setting "Let windows manage my default printer". Which is tied to the HKEY_CURRENT_USER in regedit. And if you run a PW script whit admin rights (what another admin account) then the changes in reg editor HKEY_CURRENT_USER, will be changed to the admin account running the script, which is not the goal.

Any suggestions to automatically set the default printer settings (only once) on a PC after it has been installed (Changing the image is not an option i believe)?

My approach, is to install a script on the computer (i can do that automatically), that runs a PW job. That awaits when the intended user logs in. Then it install the printer by it self, then terminates when succeeded. The problem is just that i don't know how to disable "Let windows manage my default printer" setting.


Sincerely
vicmrp
 
  • Like
Reactions: JeckeL

JeckeL

Distinguished
Jul 19, 2009
743
26
19,165
Sounds like these are active directory users, can you just add these printer manipulations/changes to their login script?

Are you using some sort of systems deployment, PXE boot situation to deploy these images? In the past, with KACE I would just make a script to remove all existing printers:

printui.exe /dl /n "Microsoft XPS Document Writer" printui.exe /dl /n "Microsoft Print to PDF" printui.exe /dl /n "Fax"

then install printer(s) afterward setting whichever you want as default, when you force one to be default windows will stop the automatic managing of printers nonsense