Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Add Printer at log on

Posted on 2006-10-20
6
Medium Priority
?
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 500 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 500 total points
ID: 17778778
You could also use the following in login script.

start    \\print_server\print_name

Cheers,
NITADMIN
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
This article is in regards to the Cisco QSFP-4SFP10G-CU1M cables, which are designed to uplink/downlink 40GB ports to 10GB SFP ports. I recently experienced this and found very little configuration documentation on how these are supposed to be confi…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

730 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