?
Solved

Logon script

Posted on 2003-11-07
7
Medium Priority
?
6,480 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 85

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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 2

Accepted Solution

by:
biggy_b earned 180 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

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 introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

777 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