Login Sctips- Individual Rooms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to add a network printer when a user logs in to our Windows 2000 domain, according to the computer that is being used (Ie. Based on room name). That way the user can only print to the printer that is in the same room as the computer. I would rather it in a batch file but I guess VBS is just as good.

Any help at all would be appreciated.

Cheers,
Nick Brown
 
You can add printers automatically in a login script. Add
the user to a group and then install the if_member.exe to
c:\windows\system32 (part of the windows resource kit
d'load) then you can do the following example:

-=-=-=-=-=-=-=-=-=-=-=-=

IFMEMBER "Admin"
IF NOT ERRORLEVEL 1 GOTO NEXT1
rundll32 printui.dll,PrintUIEntry /in /n\\calvary-
adm\AdminColour

GOTO NEXT1

:NEXT1
-=-=-=-=-=-=-=-=-=-=-=-=
Admin - group the user belongs to.
calvary-adm - servername hosting printer
adminColour - the printer name

hope this helps

typing "rundll32 printui.dll,PrintUIEntry /?" may help
you also
 
In
Nick Brown said:
Thanks Tim,

Ill try it later today :)

Nick


I guess you would need to adjust this to query for the computer name?

--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroups
so all can benefit.

This posting is provided "AS-IS" with no warranties or guarantees
and confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft Windows MVP - Windows Server - Directory Services

HAM AND EGGS: A day's work for a chicken;
A lifetime commitment for a pig.
 
Can you show us how to adjust this, to query for the computer name.

Thank,

Shing.
 
In
IT Boy said:
Can you show us how to adjust this, to query for the computer name.

Thank,

Shing.

Maybe Nick can. I can tell you how to tear apart AD and DNS along with
Exchange, and put it all back together as if nothing happened. But when it
comes toVB scripting, not much good at it. I usually use examples from
Microsoft's Script center or use Scriptomatic (script center also) and
adjust them accordingly. Not sure how to add it in this script.

--
Regards,
Ace

Please direct all replies ONLY to the Microsoft public newsgroups
so all can benefit.

This posting is provided "AS-IS" with no warranties or guarantees
and confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft Windows MVP - Windows Server - Directory Services

Security Is Like An Onion, It Has Layers
HAM AND EGGS: A day's work for a chicken;
A lifetime commitment for a pig.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top