Forcing Chrome to use the system print dialogue command not working in script

New Contributor II

I have been working on a quick printer setup for my users who are not enrolled in the jss (contractors who byod). Basically I converted the driver installer to source in compser, then in the postinstall script added an lpadmin command to add the printer, and added a command to make chrome use the system print dialogue.

The command is:
defaults write DisablePrintPreview -boolean true

when entered into terminal it works, but when run in a script it isn't taking


Valued Contributor III

It probably sets it in user space, the script will set it globaly which might not be something Chrome looks at.
You can either have the script defaults command reference the plist for each user directly /Users/$USER/Library/Preferences/ or use custom configuration profile to enforce the setting.

Valued Contributor

Do it via Configuration Profile and Custom Settings

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Valued Contributor III

Link to older discussions about this:
Discussion 1
Not sure if this helps

Gabe Shackney
Princeton Public Schools

Gabe Shackney
Princeton Public Schools