Avatar of jskfan
jskfan
Flag for Cyprus asked on

Pass username and password in windows batch

Pass username and password in windows batch

I have this code that enables direct print on the printers of each computer read from csv file CompOnly.csv
each computer is accessed with the same username and password. I just want the code below to pass username and password , so that I do not get access denied or popu to enter user name and password for each computer.

Thank you

FOR /f "delims=" %%G in (c:\Scripts\CompOnly.csv) DO wmic.exe /node:%%G printer where "Name='Myprinter'" set Direct=1

Timeout 5

Open in new window

Windows BatchScripting Languages

Avatar of undefined
Last Comment
jskfan

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA

THIS SOLUTION 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
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jskfan

ASKER
Thank you very much!!
Your help has saved me hundreds of hours of internet surfing.
fblack61