Solved

Logon script

Posted on 2003-11-07
7
6,461 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
7 Comments
 
LVL 83

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
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 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

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…
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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