Solved

Add Printer at log on

Posted on 2006-10-20
6
330 Views
Last Modified: 2010-03-19
Windows server 2003. We use the following to add printers at log on.  rundll32 printui.dll,PrintUIEntry /in /n \\server\lexmark  Even after the printer has been added it still pops up the box saying its connecting to "lexmark on server". Is there a command that can be added so that it wont run if the printer is already installed.

Thanks
0
Comment
Question by:amdvar
6 Comments
 
LVL 1

Expert Comment

by:Sandeepraj
ID: 17773556
I wish I didn't have to explain why each one isn't good for this situation but here it goes....


http://www.adminscripteditor.com/scriptlibrary/view.asp?id=478 
... is where i got the script from above...and it did the same thing as my original one-liner.

http://www.adminscripteditor.com/scriptlibrary/view.asp?id=490
... ' This script does the following
' - Removes all network Drives between G: and Z:
' - Reads text files from the \\
' - Looping through the records in "DriveMaps.txt" text file the script will map drives based on group membership
' - Looping through the records in "Printers.txt" text file the script will connect network printers
' based on group membership and assign a default printer based on a second group
... this is definitely NOT what I want to do...and it's far more complicated than it needs to be. Regardless, it uses the very same command "Set objNetwork = CreateObject("Wscript.Network")" to map a printer as the script above does.

http://www.adminscripteditor.com/scriptlibrary/view.asp?id=477
'This script installs printers on XP computers based on computer OU membership
'this script will not prevent roaming users from adding their own connection
... this is also not what I want as I need the printer installed for the entire domain, not just individual OUs. This script uses the line of code I tried in my original question... "rundll32 printui.dll,PrintUIEntry /in /n\\servername\printershare /q" which I have already verified does not work.

http://www.adminscripteditor.com/scriptlibrary/view.asp?id=412
' COMMENT: this script locates all the printers based on the Location
'         and connects the user to all the printers based on location
... i don't need this printer installed by location...i need it installed on all computers in the domain. This script also gets the printers from active directory...and this printer is a shared printer on a server, not listed in AD.

http://www.adminscripteditor.com/scriptlibrary/view.asp?id=387
...Besides the fact that this script is huge, it creates folders, favorites, hides folders, makes drives, sets a default printer and calls c:\printers.bat ... and who knows what that does.

Thanking you
Sandeep raj
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 125 total points
ID: 17774460
Sandeep, are you the same as amdvar and answering your own q here, bit unsure on what is posted above

Easiest way I can think of is

mkdir "%userprofile%\printers"
if exist "%userprofile%\printers\printer1.txt" goto skip printer1
echo Installed > "%userprofile%\printers\printer1.txt"
rundll32 printui.dll .... etc.
:printer1

i.e. drop a flag file into the user's profile once the printer has been connected.

Steve
0
 

Author Comment

by:amdvar
ID: 17774859
No I didn't have anything to do with the above post..I was kind of stumped myself on what was going on above.
0
 
LVL 8

Assisted Solution

by:nitadmin
nitadmin earned 125 total points
ID: 17778778
You could also use the following in login script.

start    \\print_server\print_name

Cheers,
NITADMIN
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

Title # Comments Views Activity
eigrp routing loop 5 59
Fiber optic multimode cable issue 6 52
Unmanaged Switches for Optimized Network Speeds 7 50
Internet options/Settings 1 43
#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

789 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