Solved

Logon script

Posted on 2003-11-07
7
6,469 Views
Last Modified: 2009-01-27
Hi

I have created a simple batch file so when the user logs on the network drives get mapped on there machine, however I also want the network printer to be installed on the users machine when they logon as well.  I have seen the command net use lpt1: //servername/sharename, however this will not work in my batch file as the printer is on a ip address.  Anyone have any ideas?

Thanks
Gareth
0
Comment
Question by:garethcummings
[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
7 Comments
 
LVL 84

Expert Comment

by:oBdA
ID: 9700308
Install the printer on a server and share it. Then use con2prt.exe (from the NT Zero Administration Kit, still working fine in W2k/XP) to map the printer in the logon script.

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

To map a network printer:
con2prt.exe /c \\PrintServer\PrintShare
("/cd \\printserver\share" to install it as default printer; /f to delete all existing connections)

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

Expert Comment

by:makerd
ID: 9701587
if it is a static IP address cannot you just swap the \\servername for \\ipaddress (obviously enter the ip eg: 10.34.8.80)
0
 
LVL 2

Expert Comment

by:makerd
ID: 9701592
sorry ignore my comment
0
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.

 
LVL 2

Accepted Solution

by:
biggy_b earned 45 total points
ID: 9703193
This is what i use for a loginscript.
**************************************

net time \\server /set /yes                 ; sets client time to servers time

net use L: /d /y                       ;deletes old drive letters
net use M: /d /y
net use O: /d /y

net use L: \\server\Company\dep /y             ;add new drives
net use M: \\server\Company\apps /y
net use O: \\server\Company\org /y

RUNDLL32 PRINTUI.DLL,PrintUIEntry /dn /n\\server\printersharename    ;deletes windows printer
RUNDLL32 PRINTUI.DLL,PrintUIEntry /in /n\\server\printersharename      ;adds windows printer

**********************************

I was never successfull at getting

net use lpt1: /delete /y
net use lpt1: \\server\printershare /y

to work for me. Ohh well hope that helps


0
 
LVL 4

Expert Comment

by:darth_wannabe
ID: 9704491
Are you running Active Directory? Can't you do this with a policy?
0
 
LVL 5

Expert Comment

by:snowsurfer
ID: 9706039
Use kixtart scripts.  They are a little scary at first, but theu work sweet
http://www.kixtart.org/

You can download it for free
0
 

Author Comment

by:garethcummings
ID: 9721043
Thanks biggy_b, that worked fine for me.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 8 in a W2K Domain 7 592
Active Directory Replication 10 1,148
windows 2000 - Enable wifi 7 150
vCenter Converter Standalone 4.01 - Convert Old Server 2000 to VM 4 205
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…
In order to fulfill our mission of inspiring learning in the technology community, Experts Exchange is launching a Course of the Month program. Premium and Team Account members will have access to one course per month as a part of their membership, …
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 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