Solved

batch file

Posted on 2006-07-11
7
348 Views
Last Modified: 2010-04-13
how to write batch file to capture a printer on startup in windows 2000
0
Comment
Question by:lsbrown1
  • 4
  • 2
7 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 300 total points
Comment Utility
you need a net use lpt command

net use lpt1 \\machinename\sharename /Y

or

net use lpt1 \\machinename\sharename\ /user:username password /Y

or

RUNDLL32 PRINTUI.DLL,PrintUIEntry /dn /n\\COMPUTERNAME\PRINTERNAME      // removes printer    
RUNDLL32 PRINTUI.DLL,PrintUIEntry /in /n\\COMPUTERNAME\PRINTERNAME       // adds printer

Zero Administration Kit
http://www.microsoft.com/ntworkstation/downloads/Recommended/Featured/NTZAK.asp

How to Use Con2prt.exe to Connect to a Network Printer
http://support.microsoft.com/?kbid=181663
0
 
LVL 43

Expert Comment

by:Steve Knight
Comment Utility
Maybe I am missing something here with the /Y but you should be able to just use /persistent:yes to make it come back after a reboot.  This is user based though so if you want it to happen for different users they will all need it setup.

net use lpt1 \\server\printershare /persistent:yes
0
 

Author Comment

by:lsbrown1
Comment Utility
this device will login to terminal service
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 57

Expert Comment

by:Pete Long
Comment Utility
/Y

does the same as

/persistent:yes

m8 :)
0
 
LVL 43

Expert Comment

by:Steve Knight
Comment Utility
[/Y]: Thought it probably did, always used the long way.
Steve
0
 
LVL 57

Expert Comment

by:Pete Long
Comment Utility
:^)  np
0
 
LVL 57

Expert Comment

by:Pete Long
Comment Utility
ty
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now