Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

batch file

Posted on 2006-07-11
7
Medium Priority
?
356 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 900 total points
ID: 17088622
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
ID: 17088828
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
ID: 17089545
this device will login to terminal service
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 57

Expert Comment

by:Pete Long
ID: 17093405
/Y

does the same as

/persistent:yes

m8 :)
0
 
LVL 43

Expert Comment

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

Expert Comment

by:Pete Long
ID: 17097421
:^)  np
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 17121167
ty
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

604 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