Re: Adding IP printer and install driver via script



The driver has to be installed using the setup program from HP. If there is
an inf file in \Windows\inf you might be able to install it with the "Add
printer" wizard"

--
Jim Vierra

"Slacker" <Slacker@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:98BC2D06-24C3-40F0-B63E-F5C5BCBA2AF4@xxxxxxxxxxxxxxxx
> I'm trying to creat a VB script to Add a HP LaserJet 4300 Printer to a
> group
> of computers. I figured out how to creat the standard TCP/IP port but I'm
> not sure about getting the driver installed. The driver is located on a
> server share \\server\share\lj4300
> In the example I was following, I was unsure about this line...
> objDriverPath = "C:\Scripts\NewPrinter.dll"
> I wasn't sure what dll file to put there because all of the files were of
> type dl_.
>
>
> This is the error that I get when I run the script I created...
> C:\Documents and Settings\Administrator\Desktop\test.vbs(35, 1)
> SWbemObjectEx: Generic failure
>
> This is the script I created...
> **********************************************************
> *VB Script to add a Standard TCP/IP printer
> *
> **********************************************************
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
> Set objNewPort = objWMIService.Get _
> ("Win32_TCPIPPrinterPort").SpawnInstance_
>
> objNewPort.Name = "IP_1.2.3.4"
> objNewPort.Protocol = 1
> objNewPort.HostAddress = "1.2.3.4"
> objNewPort.PortNumber = "9100"
> objNewPort.SNMPEnabled = False
> objNewPort.Put_
>
>
> objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege",
> True
>
> Set objDriver = objWMIService.Get("Win32_PrinterDriver")
>
> objDriver.Name = "HP LaserJet 4300 PCL 6"
> objDriver.SupportedPlatform = "Windows NT x86"
> objDriver.Version = "3"
> objInfname = "\\server\share\lj4300\hpc4300c.inf"
> intResult = objDriver.AddPrinterDriver(objDriver)
>
>
> Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_
>
> objPrinter.DriverName = "HP LaserJet 4300 Series PCL 6"
> objPrinter.PortName = "IP_1.2.3.4"
> objPrinter.DeviceID = "ScriptedPrinter"
> objPrinter.Location = "USA/Redmond/Building 37/Room 114"
> objPrinter.Network = True
> objPrinter.Shared = True
> objPrinter.ShareName = "ScriptedPrinter"
> objPrinter.Put_
> **********************************************************
> Any suggestions would be greatly appreciated.
>
> Thanks,
> Stephen
>


.



Relevant Pages

  • Re: [SLE] Missing 3D (was Compiz issues.)
    ... This is driver file location in above package ... post-uninstall script that will call tiny-nvidia-installer. ... Strange that it didn't offered to prepare existing kernel sources first. ... It can be that Smart did just what is programmed to do, install rpm, run ...
    (SuSE)
  • Re: vbs to configure printer to remote machine
    ... Description The printer driver is unknown. ... Win32 error code 1797 ... copy the files you want to install into this directory. ... Microsoft Windows Script Host Version 5.6 ...
    (microsoft.public.windowsxp.print_fax)
  • Re: a script to add a new printer
    ... You install first the port and the driver, ... >> with the MS Windows 2003 Server Resource Kit from a script. ...
    (microsoft.public.scripting.wsh)
  • Re: apsfilter question/problem
    ... I don't have a fix to your apsfilter issue, but if you you are interested in another possible printing solution... ... that mentioned that driver, 10) PPA printer, so I chose that. ... the apsfilter setup script found it & didn't complain. ... Do I need to install another more complete version? ...
    (freebsd-questions)
  • Re: XP HOME BOOT FAILURE
    ... you remove the driver for the graphics card, ... >> If you run a repair install as I initially described, ... A repair install should bypass that but it will ... >>>> on, follow the screens. ...
    (microsoft.public.windowsxp.accessibility)

Quantcast