Add Printer Script

Completed Posted Apr 27, 2004 Paid on delivery
Completed Paid on delivery

Hello,

I need an editable vb script (.vbs) or batch file to add a local printer to a machine in Win2K. This can easily be done from the following microsoft article <[url removed, login to view];en-us;189105> ( also refererence attachment if link doesnt work) However I need the script to extrapolate the current machine name to the syntax, add the printer, print a string of text to the newly installed printer then delete the printer after printing.

Here is a summary of what is desired using Microsoft's support article above.

1. Extrapolate the current machine name (it is currently listed as "server" in the example) into the code below. Instead of the Afga printer modiy code/swithces to install a "Generic / Text Only printer" using COM1.

rundll32 [url removed, login to view],PrintUIEntry /ia /c\\server /m "AGFA-AccuSet v52.3" /h "Intel" /v "Windows 2000" /f %windir%\inf\[url removed, login to view]

rundll32 [url removed, login to view],PrintUIEntry /if /b "Test Printer" /c\\SERVER /f "%windir%\inf\[url removed, login to view]" /r "lpt1:" /m "AGFA-AccuSet v52.3"

2. Print the following text "Hello" to the newly installed Generic / Text Only printer on COM1

3. Delete the printer

Preferably the code should be 1 vb script or bat file that can be edited and not reference an external file for the print job.

I would like 2 versions of this (2 seperate files). One that will be executed on a local machine just as listed above and another for use on remote machines. For the remote version the only difference would be a prompt box for entering the target machine which would replace the get machine name function.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

Windows 2000

Engineering Microsoft MySQL PHP Software Architecture Software Testing Visual Basic Windows Desktop

Project ID: #3190244

About the project

2 proposals Remote project Active Apr 30, 2004

Awarded to:

alinfaur

See private message.

$17 USD in 2 days
(163 Reviews)
5.9

2 freelancers are bidding on average $17 for this job

nick76

See private message.

$17 USD in 2 days
(3 Reviews)
2.8