Hi there,
For my company i am building my first script. everything is done except 1 thing.
The system administrator needs this script to setup the computer for use after the imaging. also the printer needs to be set to default
there are a minimum of 5 printers for every image so i want to create an menu in the command prompt so the user can insert an letter like A,B,C,D,E,F to choose the printer he wants. i hope you get my point. i know there is a way to do that but i need the full command.. could someone help me out??
would be great ! thanks !
Bram
make a list of available printers in CMD
Moderator: DosItHelp
Re: make a list of available printers in CMD
Try this
Code: Select all
@echo off
:printer
Setlocal EnableDelayedExpansion
cls
Echo =============================
Echo = Printer Setup =
Echo =============================
Echo.
Echo Select Printer ( A,B,... etc):
Echo -------------------------------- &Echo.
Echo A^> Printer 1
Echo B^> Printer 2
Echo C^> Printer 3
Echo D^> Printer 4
Echo E^> Printer 5
Echo F^> Printer 6
Echo.
Set "input="
Set /P "input= Printer: "
IF /i "!input!" == "A" ( goto printer1 )
IF /i "!input!" == "B" ( goto printer2 )
IF /i "!input!" == "C" ( goto printer2 )
IF /i "!input!" == "D" ( goto printer2 )
IF /i "!input!" == "E" ( goto printer2 )
IF /i "!input!" == "F" ( goto printer2 )
:printer1
::put commands to set printer 1 here
goto next
:printer2
::put commands to set printer 2 here
goto next
:printer3
::put commands to set printer 3 here
goto next
:printer4
::put commands to set printer 4 here
goto next
:printer5
::put commands to set printer 5 here
goto next
:printer6
::put commands to set printer 6 here
goto next
:next
:: Here put the rest of the codes
-
- Posts: 32
- Joined: 07 Sep 2012 03:50
Re: make a list of available printers in CMD
thanks, i will try this out!
-
- Posts: 32
- Joined: 07 Sep 2012 03:50
Re: make a list of available printers in CMD
after reading your script i determined that it is the same one i created. you need to fill in the names of that printer. my idea was that the script automatically shows you the added printers. so that if you execute it on an other pc with other printers, it will automatically show you that printers. i don't want to change the script for every pc with different printers. is this even possible? or did i read your script wrong?