Questions

using VBS script

+
0 Votes
Locked

using VBS script

slatimer76
Can you setup a login script to load printer drivers for a mapped printer if the drivers are not present on the computer? I figure I would need to have the .inf file on a share that can be reached by the computer to find the drivers, but for the actual scripting, I am not sure.
  • +
    0 Votes
    cmiller5400

    I had written a script eons ago to add printers. there is an option to specify where the driver(s) are located.

    +
    0 Votes
    1bn0

    'Add printers
    AddPrinterConnection "\\PrnSrvr\Printer1"
    AddPrinterConnection "\\PrnSrvr\Printer2"
    If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"ColorPrinter") Then AddPrinterConnection "\\PrnSrvr\ClrLsr"


    'Map printer

    Net Use LPT3 \\PrnSrvr\Printer1


    If the printer is shared from a windows print server the server should have the drivers and install them correctly.

    The Net Use command is only necessary for programs (DOS apps generally) that do not recognise installed windows printers and will only print to a "hardware" device.

    +
    0 Votes
    slatimer76

    I agree with you that the printer should install the drivers. I am using Windows Server 2008 standard (x64) and when i try to install the network printer, it tells me the drivers are not installed. I am not sure if it is an HP thing (using HP printers) or a windows 2008 thing, the drivers not being fully compatible. According to HP, the drivers are for 2008 as well. When i use the script, if i have not manually installed the drivers on the admin login, an error occurs. Thanks for the replys.

  • +
    0 Votes
    cmiller5400

    I had written a script eons ago to add printers. there is an option to specify where the driver(s) are located.

    +
    0 Votes
    1bn0

    'Add printers
    AddPrinterConnection "\\PrnSrvr\Printer1"
    AddPrinterConnection "\\PrnSrvr\Printer2"
    If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"ColorPrinter") Then AddPrinterConnection "\\PrnSrvr\ClrLsr"


    'Map printer

    Net Use LPT3 \\PrnSrvr\Printer1


    If the printer is shared from a windows print server the server should have the drivers and install them correctly.

    The Net Use command is only necessary for programs (DOS apps generally) that do not recognise installed windows printers and will only print to a "hardware" device.

    +
    0 Votes
    slatimer76

    I agree with you that the printer should install the drivers. I am using Windows Server 2008 standard (x64) and when i try to install the network printer, it tells me the drivers are not installed. I am not sure if it is an HP thing (using HP printers) or a windows 2008 thing, the drivers not being fully compatible. According to HP, the drivers are for 2008 as well. When i use the script, if i have not manually installed the drivers on the admin login, an error occurs. Thanks for the replys.