IP Printing and allowing users to Click and Install a printer Via Web page or Sharepoint

Posted on 2011-10-28
Last Modified: 2012-06-27
the scenario:

Lets say I have two sites Denver and Houston, each location I have 100 printers, currently to install a printer for an end user we either remotely install a printer using windows explorer or have an onsite tech visit the workstation. We do not use shared printers or publish the printers to AD. instead each printer has it own NIC Card and we create a local TCP/IP port on the PC. Example HP LJ 4050TN port IP_192.168.1.100. I would like to enable the user to have the ability to install their own printers by going to a webpage or sharepoint site. The Idea is - the user in houston can click on a Houston Page and there would be all of the printers listed. The user would then click on the printer and the Printer driver and the corresponding TCP/IP port would then get installed. We are a XP and Windows 7 shop currently migrating of to Win7

Any Idea's
Question by:youngrmy
    LVL 30

    Accepted Solution

    for 32bit systems
    for windows 7

    that should point you in the correct direction as then you need to somehow make the button click use a script to install the printer
    LVL 7

    Author Comment

    Thanks for the Help, Those links did point me in the correct direction

    The result - I was able to create a sharepoint site, Created a shortcut to the Script, and the Printers are self installing when clicked

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    set objNewPort = objWMIService.get("Win32_TCPIPPrinterPort").SpawnInstance_
    Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_
    objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True
    Set objDriver = objWMIService.Get("Win32_PrinterDriver")
    objDriver.Name = "Driver name from INF File"
    objDriver.SupportedPlatform = "Windows NT x86"
    objDriver.Version = "3"
    objDriver.FilePath = "K:\\DRIVERS\\Canon Copier\\pcl6"
    objDriver.Infname = "K:\\DRIVERS\\Canon Copier\\pcl6\\P62KUSAL.INF"
    intResult = objDriver.AddPrinterDriver(objDriver)

    'Installs Printer Port
    objNewPort.Name = "Printer IPAddress"
    objNewPort.Protocol = 1
    objNewPort.HostAddress = "Printer IPAddress"
    objNewPort.PortNumber = 9100
    objNewPort.SNMPEnabled = True

    'Install Printer
    objPrinter.DriverName = "Driver name from INF File"
    objPrinter.PortName = "Printer IPAddress"
    objPrinter.DeviceID = "Driver name from INF File"
    objPrinter.Location = "Type in the Location information Here"
    objPrinter.Network = True
    LVL 30

    Expert Comment

    glad I could help

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
    New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
    This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
    This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now