Sunday, 10 April 2016 00:00

Batch file for Windows 7 to add printers and set default by seat (computername)

set script=cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs

%script% -x

if /i %COMPUTERNAME%==RED01 set default=laser2
if /i %COMPUTERNAME%==RED02 set default=laser2
if /i %COMPUTERNAME%==RED03 set default=laser2
if /i %COMPUTERNAME%==SMARTBRDRED set default=laser2

if /i %COMPUTERNAME%==RAINBOW01 set default=laser2
if /i %COMPUTERNAME%==RAINBOW02 set default=laser2
if /i %COMPUTERNAME%==RAINBOW03 set default=laser2
if /i %COMPUTERNAME%==SMARTBRDRAINBOW set default=laser2


if /i %COMPUTERNAME%==YELLOW01 set default=laser1
if /i %COMPUTERNAME%==YELLOW02 set default=laser1
if /i %COMPUTERNAME%==YELLOW03 set default=laser1
if /i %COMPUTERNAME%==SMARTBRDYELLOW set default=laser1


if /i %COMPUTERNAME%==GREEN01 set default=laser1
if /i %COMPUTERNAME%==GREEN02 set default1=laser1
if /i %COMPUTERNAME%==GREEN03 set default1=laser1
if /i %COMPUTERNAME%==SMARTBRGREEN set default=laser1


if /i %COMPUTERNAME%==ORANGE01 set default=laser1
if /i %COMPUTERNAME%==ORANGE02 set default=laser1
if /i %COMPUTERNAME%==ORANGE03 set default=laser1
if /i %COMPUTERNAME%==SMARTBRDORANGE set default=laser1


if /i %COMPUTERNAME%==BLUE01 set default=laser3
if /i %COMPUTERNAME%==BLUE02 set default=laser3
if /i %COMPUTERNAME%==BLUE03 set default=laser3
if /i %COMPUTERNAME%==SMARTBRDBLUE set default=laser3

if /i %COMPUTERNAME%==SMARTBRD701 set default=laser3
if /i %COMPUTERNAME%==SMARTBRD702 set default=laser3
if /i %COMPUTERNAME%==SMARTBRD703 set default=laser3


%script% -ac -p \\server1\laser1
%script% -ac -p \\server1\laser2
%script% -ac -p \\server1\laser3

%script% -t -p \\server1\%default%
Last modified on Sunday, 10 April 2016 21:38

9 comments

  • Comment Link spestenty Tuesday, 20 April 2021 08:48 posted by spestenty

    https://ponlinecialisk.com/ - cialis generic online

    Report
  • Comment Link Immarlina Saturday, 08 May 2021 10:59 posted by Immarlina

    kamagra duro

    Report
  • Comment Link spestenty Tuesday, 11 May 2021 10:37 posted by spestenty

    viagra prescription

    Report
  • Comment Link spestenty Thursday, 13 May 2021 09:10 posted by spestenty

    cheaper alternative to levitra

    Report
  • Comment Link spestenty Monday, 07 June 2021 09:20 posted by spestenty

    best place to buy cialis online

    Report
  • Comment Link spestenty Wednesday, 09 June 2021 02:10 posted by spestenty

    buying cialis online reviews

    Report
  • Comment Link Darrenhaima Wednesday, 09 June 2021 12:53 posted by Darrenhaima

    "Howdy! I just wish to give you a big thumbs up for your great information you've got here on this post. I will be returning to your blog for more soon."
    דירות דיסקרטיות ברמת גן
    34343dfsf4f

    Report
  • Comment Link spestenty Thursday, 10 June 2021 13:36 posted by spestenty

    cialis online purchase

    Report
  • Comment Link spestenty Saturday, 12 June 2021 08:50 posted by spestenty

    viagra help premature ejaculation

    Report

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.