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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

776 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