Avatar of jskfan
jskfanFlag for Cyprus

asked on 

Create printer of port type Standard TCP/IP

Create printer of port type Standard TCP/IP

The code below creates printer with port type as local Port. I need the port type to be Standard TCP/IP
Any help will be very appreciated

Thank you

@echo off
setlocal
for /f %%a in (CompPrinterConf.txt) do (
	@echo starting pnpport on %%a
	cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\prnport.vbs" -a  -s %%a -r "printer1" -h hostname -o raw -n 9100
	@echo Waiting 5 seconds
	timeout 5
	@echo starting setting MyPrinter on %%a
	cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a  -p "Myprinter" -m "Generic / text only" -r "printer1" -s %%a
	REM Not really needed, because the script will continue with the next machine
	REM timeout 5


)

Open in new window

PowershellWindows BatchVB Script

Avatar of undefined
Last Comment
jskfan
ASKER CERTIFIED SOLUTION
Avatar of Kesavan Jeganarayanan
Kesavan Jeganarayanan
Flag of Singapore image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of jskfan
jskfan
Flag of Cyprus image

ASKER

Thank you ..

The Script I posted already creates Standard TCP / IP Port...now sure why I posed that script.
VB Script
VB Script

VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic, but with some important differences. VBScript is commonly used for automating administrative and other tasks in Windows operating systems (by means of the Windows Script Host) and for server-side scripting in ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.

39K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo