Configure Group Policy to disable Print Preview screen
Download the Group Policy template for Chrome
Unzip the contents on the domain controller
Open the "Configuration" folder
Open the "admx" folder
Copy the Chrome.admx file and the appropriate language folder (En-US) into the folder where you keep your policy settings (Usually c:\Windows\PolicyDefinitions)
Open Group Policy Management (if your machine does not have it. Follow the section " Install Group Policy Management" to install it)
Open Group Policy Management using PowerShell
Enter gpedit.msc to run Group Policy Management.
- Go to: Computer Configuration > Administrative Templates > Google Chrome > Printing
Double-click on "Disable Print Preview"
Set the policy to "Enabled"
Click "OK"
Install Group Policy Management
Create a new .bat file and copy code below into it. After that, double click to run the .bat file.
@echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
pause
Referrence: https://kb.printerlogic.com/s/article/How-to-disable-Chrome--Print-Preview-screen
没有评论:
发表评论