Solved

Script with Net Use LPT1 command to go to a machine specific path through GPO distribution - any ideas?

Posted on 2006-11-28
5
1,084 Views
Last Modified: 2010-05-18
Here's another one guys, I hope someone can help :)

I'm completely familiar with the NET USE command for setting up mapped folders and redirected LPT ports.

I have a more specific request though. Could anyone tell me if there is any syntax I can use within a line that redirects the LPT port to a location based on the specific users machine name? As an example, I want the machine 'JOHN-SMITH' to do the following:

NET USE LPT1 \\JOHN-SMITH\HPPRINTER\

But I don't want to have to do it for each user manually in this way. I want to roll out a GPO that will do something to the effect of:

NET USE LPT1 \\USERSMACHINE\HPPRINTER\

So that when the system logs in and gets the script from the GPO, it automatically maps the LPT port having read the user machine name. I hope this makes sense. Perhaps some kind person could advise?

Many thanks,

Bluemercury
0
Comment
Question by:bluemercury
  • 3
5 Comments
 
LVL 14

Accepted Solution

by:
canali earned 500 total points
ID: 18032521
@echo off
::mapLPT.cmd
::
net use LPT1 \\%COMPUTERNAME%\HPPRINTER
:: bye Gastone
0
 
LVL 1

Author Comment

by:bluemercury
ID: 18059628
Thanks you so much for posting this - couldn't find it anywhere on the web! I ended up using the net use command on each computer locally in the end as i was desperate to get things working. In the next few weeks there are going to be some new machines joining the network though, and as they do I'll try using your suggestion via a GPO. I'll come back to let you know if it works, and award points once I've had a chance to impement it.

Thanks so much for your help.

Best wishes,

Bluemercury
0
 
LVL 1

Author Comment

by:bluemercury
ID: 18389784
I'd like to still try out the user's solution - I suspect it will work, and if so he deserves the credit for having advised it. I have yet to be able to test it in our working environment. I'm due to reimplement the whole network at my work place in the next 3 weeks though, so could you leave it open that long? I promise to come back and respond within 21 days :)

Bluemercury
0
 
LVL 1

Author Comment

by:bluemercury
ID: 18670330
Ok, it took a little longer than 3 weeks (lots of Server problems at work) but I've finally been able to try out your Net Use suggestion. It worked fantastically, and speed up the process of distrbuting DOS printer maps using a GPO no end! Thanks so much for your help - class A advice, and I will award the points immediately.

Many thanks,

Bluemercury
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

948 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now