Ian_Cannonier Posted September 15, 2004 Share Posted September 15, 2004 Has anyone ever tried this? I have been given the dubious task of creating several of them and I haven't got a clue. Can anyone offer any information that will ease my headache ? Link to comment Share on other sites More sharing options...
SergeyAV Posted September 15, 2004 Share Posted September 15, 2004 For exapmle:Dim WSHShellSet WSHShell = WScript.CreateObject("WScript.Shell")WshShell.Run "rundll32 printui.dll,PrintUIEntry /if /b " & """" & "LaserJet6L" & """" & " /f %windir%\inf\ntprint.inf /r " & """" & "lpt1:" & """" & " /m " & """" & "HP LaserJet 6L" & """", 2, trueWshShell.Run "rundll32 printui.dll,PrintUIEntry /y /n " & """" & "LaserJet6L" & """", 2, true Link to comment Share on other sites More sharing options...
SergeyAV Posted September 15, 2004 Share Posted September 15, 2004 For more information try:rundll32 printui.dll,PrintUIEntry /? Link to comment Share on other sites More sharing options...
WhatBackHand Posted September 15, 2004 Share Posted September 15, 2004 have a look here PrintUI.dll.I use the following in a batch file to add a printerRUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /n\\Server\PrinterShareNameTo remove the printer change the /ga to /gd. You need to run the DLL or batch file with local administrator rights. Note that you still have to login as each profile if you need to change the default printer.I was put onto this a few months back and have been using it in a batch file to add (or remove) "group" printers. Can be a great time saver if you have several printers to manage for a group.I don't know immediatelyhow you can incorporate this into an unattended install though?Hope it helps! Link to comment Share on other sites More sharing options...
oioldman Posted September 15, 2004 Share Posted September 15, 2004 To add to winnt.sif, i did this =>extract the deploy.cab to a folderrun setup.exe, fill in the sections just tso it is happyat the printer section, insert servername\printersharenamethen finishopen your unattended.txt filelocate section and copy and paste ths to your winnt.sifI'll be honest and say i haven't actually tried this, but as is done via official unattended.txt create program, i don't see why not. Link to comment Share on other sites More sharing options...
drjunzzon Posted September 16, 2004 Share Posted September 16, 2004 I'm using a tool called "printmig" to add local print drivers unattended. Don't remember where I got it from, I know there is various of it on the net but the one I use is a Microsoft one (according to the about box).First I have created the printers manually, adding any 3d party drivers and set any settings needed. Then I make a backup of my printers in printmig and it saves all files and settings needed into a single .CAB file.In my unattended script, I just make a restore using printmig command line options and voila, I have all my printers with all settings restored.At least, this is MY way of dealing with the printer install... /DrJ Link to comment Share on other sites More sharing options...
MaDxCrEaM Posted September 16, 2004 Share Posted September 16, 2004 I also used Installrite to monitor my pc while I installed my printer and drivers to make an install package, that worked fine for me. Link to comment Share on other sites More sharing options...
simonp Posted September 16, 2004 Share Posted September 16, 2004 Im trying to install a network printer via something of the form:rundll32 printui.dll,PrintUIEntry /if /b "Test Printer" /f %windir%\inf\ntprint.inf /r "lpt1:" /m "AGFA-AccuSet v52.3"It works with lpt1: as the port for the command but I want to use an IP address. If I change lpt1: to an ip address it doesnt seem to work. Anyone know whether this is possible and what the correct formatting should be? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now