I would like to install all of our TC/IP printers using the K1000 without having any enduser input. 

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

Could you provide more details? Are you installing them on a Windows computer? MacOS? Installing straight to the printer via IP address or do you have a print server with queues that you are going through?

Answered 04/11/2013 by: chucksteel
Red Belt

  • +1 for the above. We need a lot further detail.
  • We are using a majority of Windows Xp machine. Our users have restricted access.. We have created the following scirpt but it only runs to success if we are logged in as an administrator or as a power user.

    ''----------------------------------------------''
    ''----------------------------------------------''
    '' ''
    '' Script to automate TCP/IP printer installs ''
    '' ''
    '' ''
    ''----------------------------------------------''
    ''----------------------------------------------''


    Set WSHNetwork = WScript.CreateObject("WScript.Network")
    set shell = WScript.CreateObject( "WScript.Shell" )
    CompName = shell.ExpandEnvironmentStrings("%COMPUTERNAME%")
    Set objWMIService = GetObject("winmgmts:\\" & CompName & "\root\cimv2")
    Set objNewPort = objWMIService.Get("Win32_TCPIPPrinterPort").SpawnInstance_
    Set oShell = WScript.CreateObject("WScript.shell")
    Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_
    Set IPConfigSet = objWMIService.ExecQuery _
    ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE")
    Set colOSes = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")

    Sub createPort (name, ip)
    objNewPort.Name = name
    objNewPort.Protocol = 1
    objNewPort.HostAddress = ip
    objNewPort.SNMPEnabled = False
    objNewPort.Put_
    end sub

    sub addPrinter (driver, port, name)
    objPrinter.DriverName = driver
    objPrinter.PortName = port
    objPrinter.DeviceID = name
    objPrinter.Location = "ADMIN"
    objPrinter.Network = True
    objPrinter.Shared = false
    objPrinter.ShareName = ""
    objPrinter.Put_
    end Sub

    '------------------'
    'Copy Files: '
    '------------------'
    'Const OverWriteFiles = TRUE

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    If Not objFSO.FolderExists("C:\okidata\okidata") Then
    Set objFolder = objFSO.CreateFolder("C:\okidata\okidata")
    objFSO.CopyFolder ".\7x86" , "C:\okidata\okidata\7x86" , OverWriteFiles
    objFSO.CopyFolder ".\7x64" , "C:\okidata\okidata\7x64" , OverWriteFiles
    End If


    '------------------'
    'Add printer ports:'
    '------------------'
    'createPort "HP4200_BCEHFP_North", "150.142.155.50"
    'createPort "HP8500_Exec_color", "150.142.153.21"
    createPort "okidata" , "192.168.1.86"

    '----------------------------------------------'
    'Install printers with drivers native to WinXP:'
    '----------------------------------------------'
    ' TCP/IP Port Name Display Name
    ' -------------------- -----------------
    'addPrinter "HP LaserJet 4200 PS", "HP4200_BCEHFP_North", "HP4200 North PS"
    'addPrinter "HP LaserJet 4200 PCL 6", "HP4200_BCEHFP_North", "HP4200 North"

    '-------------------------------------------------' Display name
    'Install printers with externally defined drivers:' for printer Driver location Port name Driver name in .inf file
    '-------------------------------------------------' ----------- --------------------------------- ------------ -----------------------
    'oshell.run "RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b ""HP8150 South PS"" /f U:\instalxp\hp8150ps\HP8150PS.INF /r ""HP8150_BCEHFP_South"" /m ""HP LaserJet 8150 PS""" ,,true
    If Not objFSO.FolderExists("C:\Program Files (x86)") Then
    oshell.run "RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b ""AdminDColor"" /f C:\okidata\okidata\7x86\OP745.INF /r ""okidata"" /m ""OKI C6150(PCL)""" ,,true
    Else
    oshell.run "RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b ""AdminDColor64"" /f C:\okidata\okidata\7x64\OP745.inf /r ""okidata"" /m ""OKI C6150(PCL)""" ,,true
    End If

    'SETS PRINTER AS DEFAULT.


    Set colInstalledPrinters = objWMIService.ExecQuery _
    ("Select * from Win32_Printer Where Name = 'AdminDColor64'")

    For Each objPrinter in colInstalledPrinters
    objPrinter.SetDefaultPrinter()

    next
    • I haven't tried it out in a while, but this should still work for a VB script: http://www.kace.com/support/resources/kb/article/how-to-call-a-visual-basic-script

      For your script, you would want to run it as an online script and provide admin credentials under the "Run As" section of the Kscript.
Please log in to comment
1

This might be a good start.

K1000 KKE's: https://support.software.dell.com/k1000-systems-management-appliance/kb?k=KKE

http://www.itninja.com/question/installing-printers-drivers

Answered 04/11/2013 by: dugullett
Red Belt

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment
Answer this question or Comment on this question for clarity