On Error Resume Next
'Object Variables
SET objNet = CreateObject("WScript.NetWork")
SET objfso = CreateObject("Scripting.FileSystemObject")
SET objtextfile = objfso.OpenTextFile("C:\pmdata.csv")
Set clrprinters = objNet.EnumPrinterConnections
pcdomain = objNet.UserDomain
pcname1 =...
Think i've got it sussed now going to use ubound and add a seperate loop with a different split in it to add the printers should allow it go on add infintum in theory. Many thanks for all the help on this. I'll let you know how I get on.
Printer# one is used later on to give the name of the printer thats needs to be mapped.
see below:
DO Until pcname1 = masPC OR objtextfile.atendofstream
arrStr = split(objtextfile.ReadLine,",")
masPC = arrstr(0)
LOOP
IF pcname1 = masPC THEN
Printer1 = arrstr(1)...
DO Until pcname1 = masPC OR objtextfile.atendofstream
arrStr = split(objtextfile.ReadLine,",")
masPC = arrstr(0)
LOOP
IF pcname1 = masPC THEN
Printer1 = arrstr(1)
Printer2 = arrstr(2)
this method is working but i'm hoping to future proof the script so if the...
Hi wonder if anyone can help me with this. I have a csv file which contains a list of prtinters and the corrosponding machine name. I have the script pull the text out into a string array (correct term?) and then have it assign the printers
printer 1 = arrstr(1)
printer 2 = arrstr(2)
etc etc...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.