Solved

batch file

Posted on 2006-07-11
7
350 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
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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

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…
When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 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