Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Printer test page

Reply
 
Old 12-31-2008   #1 (permalink)
Tcs


 
 

Printer test page

We have more than four (4) dozen printers spread around our
organization at more than a dozen different sites. A couple months
ago, we moved out of several sites, into one location, so the number
of separate sites has declined...slightly. My old boss, who left just
after the move, was trying to consolidate printing, and was removing
printers from service, wherever he could. A bunch have gone back into
service...after he left. When we moved, we set up a new print server
for most of the printers.

What I'm finding is that while the printers we've installed on the
print server are mostly correct regarding name, location and such,
quite a few of the printers themselves are named something other than
what they should be.

So what I was thinking of doing, to confirm what is located where, and
what is named what, etc., is to...somehow...print a test page on each
printer, preceding such with an email to everyone that should they
find such a page on the printer, to write down the building, floor,
Dept, office, etc., and forward the page to IT.

Might there be such a script to accomplish this? Would it be better
if I just printed out a form with the information?

Any other ideas?

Thanks in advance,

Tom

My System SpecsSystem Spec
Old 01-01-2009   #2 (permalink)
hb21l6


 
 

Re: Printer test page

"Tcs" <someone@xxxxxx> wrote in message
news:473ol41u0ljudc0qejgb5i7ct0cs3qrb6g@xxxxxx
Quote:

> We have more than four (4) dozen printers spread around our
> organization at more than a dozen different sites. A couple months
> ago, we moved out of several sites, into one location, so the number
> of separate sites has declined...slightly. My old boss, who left just
> after the move, was trying to consolidate printing, and was removing
> printers from service, wherever he could. A bunch have gone back into
> service...after he left. When we moved, we set up a new print server
> for most of the printers.
>
> What I'm finding is that while the printers we've installed on the
> print server are mostly correct regarding name, location and such,
> quite a few of the printers themselves are named something other than
> what they should be.
>
> So what I was thinking of doing, to confirm what is located where, and
> what is named what, etc., is to...somehow...print a test page on each
> printer, preceding such with an email to everyone that should they
> find such a page on the printer, to write down the building, floor,
> Dept, office, etc., and forward the page to IT.
>
> Might there be such a script to accomplish this? Would it be better
> if I just printed out a form with the information?
>
> Any other ideas?
>
> Thanks in advance,
>
> Tom

Hi Tom,


Here is a different method of listing all printers..
List all printers on the network in AD and out put it to a text file..
I'm not sure how you would then print to them.

Dave


Const ADS_SCOPE_SUBTREE = 2

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = "Select printerName,serverName,location,UncName,
drivername, portName from " _
& " 'LDAP://DC=DOMAINNAME,DC=group,DC=local' where
objectClass='printQueue'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst

HFiles = "C:\PRNFile.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Set objFile = objFSO.OpenTextFile(myFile,1)

If objFSO.FileExists(HFiles) Then
' see if the file exists and open it
Set HFile = objFSO.OpenTextFile(HFiles,8, True)
else
' Create a Header file
Set HFile = objFSO.CreateTextFile(HFiles, True)
End If

i = 0
Do Until objRecordSet.EOF
i = i + 1
String1 = String1 & i & ","
String1 = String1 & "," & objRecordSet.Fields("location").Value
String1 = String1 & "," & objRecordSet.Fields("UncName").Value
String1 = String1 & "," & objRecordSet.Fields("printerName").Value
String1 = String1 & "," & objRecordSet.Fields("serverName").Value
String1 = String1 & "," & objRecordSet.Fields("DriverName").Value
String1 = String1 & VbCrLf

HFile.Write String1
String1 = ""
objRecordSet.MoveNext
Loop

set objRecordSet = nothing
Set objCommand = nothing
Set objConnection = nothing
msgbox "done"





My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Problem with Dell printer after installation of Vista SP2 (printer prints an extra page) Vista General
HP Printer won't print, except for test page Vista mail
Disabling print test page Vista General
Extra garbage on Printer Test Page Vista print fax & scan
printing test page Vista print fax & scan


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46