Last active
August 10, 2016 14:21
-
-
Save tresf/a57d6f342ca3886cb364fe153e34943f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
color 0D | |
cls | |
REM ########################################################## | |
REM # BIND QZ TRAY TO INTERNET ADDRESS # | |
REM ########################################################## | |
REM # Workaround for IE11/Edge in corporate environment # | |
REM # See also: https://github.com/qzind/tray/issues/6 # | |
REM # Modified from: https://qz.io/wiki/print-server # | |
REM # Created/Modified: 2016-08-10, Tres Finocchiaro # | |
REM ########################################################## | |
echo. | |
echo. | |
echo ################################################ | |
echo # # | |
echo # BIND QZ TRAY TO INTERNET ADDRESS # | |
echo # # | |
echo ################################################ | |
echo. | |
echo. | |
net session >nul 2>&1 | |
if %ERRORLEVEL% == 0 ( | |
echo Administrative permissions confirmed. | |
echo. | |
echo. | |
echo. | |
) else ( | |
color 0C | |
echo ERROR: THIS SCRIPT MUST BE RUN AS ADMINISTRATOR | |
echo PLEASE SIGN IN WITH ADMIN CREDENTIAL AND THEN | |
echo RIGHT CLICK, RUN AS ADMINISTRATOR | |
echo. | |
pause | |
exit | |
) | |
pause | |
cd "%PROGRAMFILES%\QZ Tray\" | |
cscript "auth\windows-keygen.js" . install localhost.qz.io | |
echo. | |
echo NOTE: The webmaster will need to change the following: | |
echo FROM: qz.websocket.connect(); | |
echo TO: qz.websocket.connect({host: "localhost.qz.io"}); | |
echo. | |
echo Finished. | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment