Installing printers from a VBScript HTA

Hi,
 I have just started with VBScript, and I'm trying to make a simple portal for printer installation. The problem is that we have a setup with different printservers, with printers with some standard names. So the HTA lets you choose where you sit, and
then installs the correct printers, from the server near you.
What am i doing wrong?
<html>
<head>
<title>Printer Installation</title>
<script language="VBScript">
Window.ReSizeTo 350, 125
Function InstPrt(strPrtSrv)
strPrtSrvName = "Print-Server-" & strPrtSrv
strPrtShrNmAA = "\\" & strPrtSrvName & "\PrinterAA"
strPrtShrNmBB = "\\" & strPrtSrvName & "\PrinterBB"
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer Where ShareName = 'PrinterAA' or ShareName = 'PrinterBB' and not ServerName = strPrtSrvName")
For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
Set WshNetwork = CreateObject("Wscript.Network")
PrinterPath = strPrtShrNmAA
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
PrinterPath = strPrtShrNmBB
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter strPrtShrNmBB
Self.Close
End Function
</script>
</head>
<center>
<a href="#" onClick="InstPrt(a01)">Install PrinterAA & BB from Server A01</a><br>
<a href="#" onClick="InstPrt(b01)">Install PrinterAA & BB from Server B01</a><br>
<a href="#" onClick="InstPrt(c02)">Install PrinterAA & BB from Server C01</a><br>
</center>
</script>
</html>

strPrtSrvName given ealier in the function? I cant call that in the Query?
You cannot use a variable inside of a query and you cannot use a variable that is not in the file.  Your file has no variable with that name.
You need to spend sometime learning VBScript first.  Run the code as VBScript then try to use it in an HTA.
Here is a partial example:
"Select * from Win32_Printer Where ShareName='PrinterAA' or ShareName='PrinterBB' and not ServerName='MyPrintServer'"
¯\_(ツ)_/¯

Similar Messages

  • Installing Printers from Windows 2008 R2 printer server using the Cname

    Am having issues installing printers on workstations from the windows 2008 R2 print server using the DNS names. the servername and Full qualified Name works fine.
    l have tweaked the Registry and Disabled the StrictNameChecking but still getting an error.  this is the message am getting...
    Printer Installation Failed
    You do not have enough privilege to complete the printer installation on the local machine.
    I found this KB and did exactly what is in the KB but stilll....
    lhttp://support.microsoft.com/kb/870911/en-us
     need help

    Hi.
    I think I solved this yesterday. We got 1 printserver, with an alias, which we had this problem to connect to. I noticed that there is a difference between x86 and 64bits system entries in the registry...
    When you are having a 64bit system, you must use REG_QWORD instead of REG_DWORD, REG_DWORD is only to be used in x86 system! See below.
    Windows 2008 server R2 64-bit 
    HKLM\SYSTEM\CurrentControlSet\Control\Print
    = ”DnsOnWire” = REG_QWORD Decimal = 1
    (reg add hklm\system\currentcontrolset\control\print /v DnsOnWire /t REG_QWORD /d 1)
    HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters
    = DisableStrictNameChecking = REG_QWORD Decimal = 1
    (reg add hklm\system\currentcontrolset\services\lanmanserver\parameters /v DisableStrictNameChecking /t REG_QWORD /d 1)
    HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters\ 
    REG_SZ = OptionalNames = “aliasname” (C-name record in DNS)
    (reg add hklm\system\currentcontrolset\services\lanmanserver\parameters /v OptionalNames /t REG_SZ)
    Windows 2008 server x86 
    HKLM\SYSTEM\CurrentControlSet\Control\Print = "DnsOnWire" = REG_DWORD Decimal = 1
    (reg add hklm\system\currentcontrolset\control\print /v DnsOnWire /t REG_DWORD /d 1)
    HKLM\SYSTEM\CurrentControlSet\services\Lanmanserver\Parameters = DisableStrictNameChecking = REG_DWORD Decimal = 1
    (reg add hklm\system\currentcontrolset\services\lanmanserver\parameters /v DisableStrictNameChecking /t REG_DWORD /d 1)
    HKLM\SYSTEM\CurrentControlSet\services\LanManServer\Parameters\  REG_SZ = OptionalNames = “aliasname”
    (C-name record in DNS)
    (reg add hklm\system\currentcontrolset\services\lanmanserver\parameters /v OptionalNames /t REG_SZ)
    Don't forget to reboot your system after these changes!
    Best Regards, Mats

  • Can't install printers from new 2012 R2 server - Error 0x0000002

    Piggybacking off this previous post by another user (http://community.spiceworks.com/topic/704198-server-2012-r2-print-server-issues), I'm having the same issues, have done the same fixes, and user even has local admin rights, but I still get the 0x0000002 error when "finishing installation" of a printer on the machine from the new 2012 R2 print server.  Any more help on this?  I'm not seeing anything in the logs that can help. Client is a W7 64-bit machine.  It installs fine on my machine, so it's got to be a permission issue somewhere?
    This topic first appeared in the Spiceworks Community

    Piggybacking off this previous post by another user (http://community.spiceworks.com/topic/704198-server-2012-r2-print-server-issues), I'm having the same issues, have done the same fixes, and user even has local admin rights, but I still get the 0x0000002 error when "finishing installation" of a printer on the machine from the new 2012 R2 print server.  Any more help on this?  I'm not seeing anything in the logs that can help. Client is a W7 64-bit machine.  It installs fine on my machine, so it's got to be a permission issue somewhere?
    This topic first appeared in the Spiceworks Community

  • IPrint Appliance 1.1 and Firefox 36.x- can't install printers

    iPrint Appliance 1.1
    Patches Applied:
    iPrint-1.1.0.409.HP.zip 2015-01-22 16:12:31
    iPrint-1.1.0.410.HP.zip 2015-01-22 16:16:56
    iPrint-1.1.0.411.HP.zip 2015-01-22 16:19:24
    iPrint-1.1.0.412.HP.zip 2015-02-02 13:33:11
    Win8.1x64 and Win7Prox64 workstations running Firefox, in an AD-only
    environment
    All was working well until Firefox upgraded from v35.x to v36.x. Now,
    we cannot install printers from the ipp page. The page pulls up,
    printer can be selected, we get the dialog box asking about installing
    the printer and the checkbox to set as default, but when proceeding
    with the install the dialog disappears and no printer installation
    commences.
    Back-revving Firefox to v35.0.1 allows printer installation to
    complete. Java ranges from 8.25 to 8.40 and the problem appears
    across all, no correlation between java version and the problem
    appearing-- only the FF version.
    Is anyone else seeing this issue?
    Thx,
    XX

    Originally Posted by DG
    iPrint Appliance 1.1
    Patches Applied:
    iPrint-1.1.0.409.HP.zip 2015-01-22 16:12:31
    iPrint-1.1.0.410.HP.zip 2015-01-22 16:16:56
    iPrint-1.1.0.411.HP.zip 2015-01-22 16:19:24
    iPrint-1.1.0.412.HP.zip 2015-02-02 13:33:11
    Win8.1x64 and Win7Prox64 workstations running Firefox, in an AD-only
    environment
    All was working well until Firefox upgraded from v35.x to v36.x. Now,
    we cannot install printers from the ipp page. The page pulls up,
    printer can be selected, we get the dialog box asking about installing
    the printer and the checkbox to set as default, but when proceeding
    with the install the dialog disappears and no printer installation
    commences.
    Back-revving Firefox to v35.0.1 allows printer installation to
    complete. Java ranges from 8.25 to 8.40 and the problem appears
    across all, no correlation between java version and the problem
    appearing-- only the FF version.
    Is anyone else seeing this issue?
    Thx,
    XX
    Yes, I have reported it to Novell. I'll let you know what happens but as usual, if you are able to open a SR then plz go ahead.
    Thomas

  • Installing a exe whilst in .hta

    Hi peoples!
    I have a link to a program on my site that works fine when
    done under the browser, BUT when I try to install it from the
    application (.hta) file it just comes up with heaps of gibberish!
    Is there a way to run an install from a hta?
    Any ideas are most welcome!!! Thanks in advance, Pete.

    No.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Pedro_3" <[email protected]> wrote in
    message
    news:ea0lbp$ilf$[email protected]..
    > Hi peoples!
    >
    > I have a link to a program on my site that works fine
    when done under the
    > browser, BUT when I try to install it from the
    application (.hta) file it
    > just
    > comes up with heaps of gibberish! Is there a way to run
    an install from a
    > hta?
    >
    > Any ideas are most welcome!!! Thanks in advance, Pete.
    >

  • Update to 10.6.8 and HP F2100 and D2400 Printers stopped working. Restored 10.6.7 and printers from Install CD's but not working,  Same with scanner

    Help....
    Updated to 10.6.8 and HP F2100 and D2400 Printers stopped working.
    Restored 10.6.7 and printers from Install CD's but not working.
    Same with F2100 scanner
    Am I glad I kept Windows desktop as without it I would be scre**ed now
    What is going on with this latest update as its like a return to Windows with things crashing or hanging up every few minutes????
    On a MacBook Air that has not been updated everything still works so what has 10.6.8 done and why won't the restore to 10.6.7 work?
    Steve

    None of those things you mentioned were what I suggested.
    I'm guessing the "ctrl click in printer preferences" means you Reset the Printing System?
    If so, that is what I would have suggested if deleting it by selecting the ( - ) button and then adding it with the ( + ) button.
    But, if HP has a fix, it likely needs to update its drivers.

  • When I try to print sth I can´t choose my printer. Adobe Reader only shows a printer I used years ago.I aleady deleted and reinstalled the Reader and deleted all other printers from the computer.How can I add a new printer to Adobe Reader?Thanks for help!

    When I try to print sth I can´t choose my printer. Adobe Reader only shows a printer I used years ago.I aleady deleted and reinstalled the Reader and deleted all other printers from the computer.How can I add a new printer to Adobe Reader?Thanks for help!

    Hi,
    I would suggest you to uninstall Adobe Reader using the cleaner tool and then re-install the latest version.
    Adobe Cleaner Tool:- Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs.
    Latest version of Adobe Reader:- http://get.adobe.com/reader/
    If you still experience the same issue, please share the following information:-
    - Screenshot of Adobe Reader showing printer options
    - Screenshot of Microsoft Word showing printer options
    - Screenshot of control panel- Control Panel\All Control Panel Items\Devices and Printers
    Regards,
    Nakul 

  • Acrobat ver 9.4.2 does not see my installed printers

    after the latest update Adobe Acrobat does not see my installed printers -   Adobe Reader sees them fine - this is creating a major problem for me as I now had to go in and mark reader as the default program - every time I try to print from acrobat it tells me I have to install a printer first - I have more than 2 printer installed ( local and network printers)  what is going on and how can I fix this - have tried doing a repair with no luck

    As suggested in a previous post I looked up the Support posting in the Forums about this issue, looking for the same solution from the issue we are experiencing since that last update. I used the first solution which seems to have worked.
    http://kb2.adobe.com/cps/891/cpsid_89178.html
    My only issue with this was clicking on manifest file, windows saved it as a .xml file not .manifest file extension. Windows does see .manifest as a .xml file but does not have a viewer to open it. I changed the saved .xml file to .manifest and then followed the instructions of copying the file into the Acrobat folder, rebooted the computer. Now the original default printer works with Acrobat 9 Pro.
    Another strange thing about this problem is that if you change your default printer to another printer in printer/faxes it will see those but not the original default printer. But the above solution did work for me.
    Best to all.

  • Installed Lion from AppStore-looks like running Leopard & Lion-wierd

    I installed Lion from the AppStore- by all accounts- it's running Lion. Yet when my machine is turned off and powered back on, the Snow Leopard appears and I lose Lion background. I have a suspiscion it is running both somehow because my computer is popping up with windows that say my start up disk is full and that I need to delete files.
    Do i need to uninstall Leopard and how do you do that? or uninstall Lion and reinstall? if so, how do you that?
    And if anyone knows how do deal with the start up disk issue, it would be greatly appreciated.
    These are instaled on a MacBookPro 2.4 Intel 2
    Thanks,
    J

    You say "by all accounts" ... please check, by going to the Apple menu, clicking About This Mac, and checking what is written under "OS X". (10.6.8? 10.7.4?)
    But deal with the drive space first, since, if you don't have enough, any software updates are unlikely to work correctly, and your system may fail. I'd advise you run Omnidisksweeper which will tell you where your largest files and folders are. Move any user files to an external hard drive, or delete any large files/folders you don't need any more. (Don't delete any system folders such as System, Library, /etc or /var ! You can, however, delete unneeded printer definitions from the /Library/Printers folder, and delete Garageband/iDVD templates from /Library/Application Support, if you don't use those programs.) Check your Downloads folder, as this can fill up. Empty your Trash.
    Matt

  • PrintBrm.exe - Migrating printers from Server 2008 R2 to 2012 R2

    Hi everyone,
    I'm trying to migrate our printers from a Windows Server 2008 R2 to a brand new Windows Server 2012 R2. While doing this, we also want to switch the drivers to a newer version. As I successfully tried this a year before with the PrintBrm.exe (but from Server
    2008 R2 to another Server 2008 R2), I choosed this tool again.
    Unfortunately it fails at some point this time. The printer export and import succeeds every time, but if I'm trying to print a testpage on the new server, it won't stop printing hyroglyphs... Only if I install a printer manually (same driver), it works
    fine.
    Do you have any solutions or ideas for that? For better troubleshooting, I attached an image of one failed testpage and the code I've written, too. Looking forward for some ideas.
    Best regards, Andreas
    Export: PrintBrm.exe -B -S \\server -F C:\Tools\filename.printerExport -nobin
    Import: PrintBrm.exe -R -F filename.printerExport -C BrmConfig.xml –O FORCE
    BrmConfig:
    <BrmConfig>
    <PLUGINS>
    </PLUGINS>
    <LanguageMonitors>
    </LanguageMonitors>
    <DriverMap>
    <DRV old="HP Universal Printing PCL 6" new="HP Universal Printing PCL 6 (v5.8.0)" />
    <DRV old="HP Universal Printing PCL 6 (v5.2)" new="HP Universal Printing PCL 6 (v5.8.0)" />
    <DRV old="HP Color LaserJet CP1510 series PCL6" new="HP Universal Printing PCL 6 (v5.8.0)" />
    <DRV old="HP LaserJet P3011/P3015 PCL6" new="HP Universal Printing PCL 6 (v5.8.0)" />
    </DriverMap>
    </BrmConfig>
    Image of the testpage:

    Hi Andreas Remdt,
    Based on your description, did you mean that complete the process of migration successfully? Would you please
    let me know which version of the Printbrm.exe command-line tool that you used to migrate?
    In addition, please open Event Viewer and check if you can find any related event (Source: PrintBRM). If any
    update, please feel free to let me know.
    Best regards,
    Justin Gu

  • Auto install printerdriver from CUPS with info from dns record

    I have a Linux server with CUPS serving our printers. Authentication is needed to print. For easy installation on our Macs, I added my printerinfo to our DNS so that the printers are browseable in OS X Lion and Mountain Lion. This setup only partly works on Mac (it works from airprint capable clients).
    When I limit the list of printers to 5 or so, I can install those printers by clicking the "+" button in the printer configuration screen, and choosing the printer from the list. The printqueue is created and the correct driver is installed. I can use the printer without problems.
    When I add more printers to DNS I don't get the list of printers directly when clicking on the "+" sign (the list is too big I guess). I get the "add printer" screen, with a list of all my printers. When I select a printer, the "location" field is taken from the DNS record (that's fine), but the driver falls back to "generic PS driver" instead of the driver I have set in the DNS record.
    What's the difference  between the "shortcut" when only a few printers are browseable, and the "add printer" wizard that list more of them? They seem to get the driver info  differently.
    As a workaround: anyone knows how to add a printer via commandline with auto configuration, the same way as clicking the "+" sign and choosing a printer ?

    Hi Eze-Oracle and Pascal Kreyer
    Thank you for your reply.
    Your advice was very helpful.
    I have completed the zone installation like the following the  after the repository is updated.
    testserver# zoneadm -z kudotest01 install
    The following ZFS file system(s) have been created:
        rpool/zones/kudotest01
    Progress being logged to /var/log/zones/zoneadm.20141217T021103Z.kudotest01.install
           Image: Preparing at /zones/kudotest01/root.
    AI Manifest: /tmp/manifest.xml.OSaiXo
      SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml
        Zonename: kudotest01
    Installation: Starting ...
                  Creating IPS image
    開始 linked: 1/1 done
                  Installing packages from:
                      solaris
                          origin:  http://localhost:80/
    ダウンロード                 パッケージ  ファイル  転送 (MB)  速度
    完了                               187/187   34347/34347  248.9/248.9  2.4M/s
    フェーズ                                  項目
    新しいアクションをインストールしています 48240/48240
    パッケージ状態データベースを更新しています      完了
    イメージ状態を更新しています      完了
    スピード検索データベースを作成しています      完了
    Installation: Succeeded
            Note: Man pages can be obtained by installing pkg:/system/manual
    done.
            Done: Installation completed in 223.473 seconds.
      Next Steps: Boot the zone, then log into the zone console (zlogin -C)
                  to complete the configuration process.
    Log saved in non-global zone as /zones/kudotest01/root/var/log/zones/zoneadm.20141217T021103Z.kudotest01.install
    testserver#
    Best regards
    ken

  • Installing printers after reinstall of OS

    Second problem after reinstall of OS X on a misbehaving drive (drive was wiped clean, then a clean install done).
    We can't install printers.
    We know where the printer drivers are located that we want to use. However, we don't know where OS X wants these drivers to be to find them using Printer Setup Utility. Do we have to start from scratch and use the Epson or Xerox driver installers? If we search for a printer that Setup Utility DOES find, our finder does not see them in ANY folder on our system. They are SOMEWHERE...are they HIDDEN? AAAAGGGGGHHHHH. We don't really have time for this. We so seldom delve into the guts of the OS that it's not second nature, like OS 9 was for us.
    On another G4, they are located in Home>users>"username">Library>Printers.
    On yet another, they are in
    Home>users>"username">Library>Printers>PPDs>Contents>Resources>en.lproj

    It sounds like you have a shop with more than one mac.
    The first thing that I would do is get Printer Setup Repair from Fixamac. It has saved my bacon more than one time. It also has the ability to properly install ppd's. Just use PSR to find the ppd and press the install button. PSR can be downloaded here and is shareware. You can use it without paying for it but the longer you have it the longer it takes before you get to use it. I bought my copy after it fixed printer services a couple of times when nothing else would.
    http://fixamac.net/software/downloads/index.html
    Want to learn more??, If you installed the Developer Package, then you have the best resource for ppd's on X. Just search for ppd on your boot volume.
    In the event that none of your macs have the Developer Tools installed here is a quote from the files (there is also a ton of other great info in these files)
    How Mac OS X Searches for and Chooses PPD Files
    Mac OS X searches for a PostScript printer's PPD file when a user creates a print queue. Mac OS X automatically searches for PPD files in the appropriate localized folder. First, it looks in the en.lproj folder in following locations, in this order:
    • /Library/Printers/PPDs/Contents/Resources/
    • /System/Library/Printers/PPDs/Contents/Resources/
    If it finds a PPD file for the printer in the en.lproj folder, it then looks for the localized PPD file in the language folder for the currently active language. See "Installing PPD Files" for information on localized folders.
    Note: The active language is the preferred language of the user who created the print queue. If the preferred language is changed, the language of the print queue does not change unless the queue is deleted and then created again.
    If Mac OS X doesn't find a PPD file for a PostScript printer in either location, it looks in the Classic System Folder, provided the Classic environment has been run once or the Classic System Folder has been selected at least once in the Startup Disk pane of System Preferences. In other words, Mac OS X must know of the existence of the Classic System Folder.
    :System Folder:Extensions:Printer Descriptions:

  • Installing software from CDs

    Unlike on Windows PCs, there appears to be no Wizard or any assistance when trying to install software from CDs (eg. for printers etc) Is there any free software on the net available to download which would do the job for me?
    Thanks in advance for any replies

    hey there STL,
    it should be simple to install software:
    1) load the disc
    2) when it appears on your desktop, double-click it & it should open
    3) there should be icons w/ titles-eg. a page & read me, compass & register, box & install
    4) click on the icon you want- in this case install & it should open
    5) follow the instructions that appear, these should walk you through
    in most cases use the Easy Install, the software will load, optimize your system & the 'puter will tell you when it's done. quit & eject the disc.
    good luck, hope this helps

  • Migrating printers from XP to Win7. Best Practice?

    I am currently using PRINTMIG to migrate mapped printers from XP to win7 on workstations. I am experiencing failures to map Dell and RICO printers. I just read "Printbrm" is supposed to replace PRINTMIG but does it also work with XP?
    Im also curious what others are currently using to migrate and remap printers from XP to Win7?????
    tconners

    I don't know that I've ever found a really great way to do printer migrations from one OS to another. For one you often have issues going from 32-bit drivers on the XP side to 64-bit drivers on the Windows 7 and beyond side.  Plus, depending on
    your current methodology of installing printers (i.e. printer server with global shares vs local port connection, or tcpip, etc.) different challenges can arise.  We've explored the idea of using a print server with heavy tie in to our AD environment. 
    In this case, user's would be assigned a group, likely based on location or department, and this would map the given printers for them automatically.  Depending on the size and complexity of your environment, this could be a potential idea to consider.

  • Disable "nearby printers" from showing in the printers dialog box

    I have been searching for an answer to this question ever since the "nearby printers" option was added to OS 10; Apple, please help. I found the exact same question posted here:
    http://discussions.apple.com/message.jspa?messageID=11205661
    but that user describing the CUPS solution is not using network printers!
    How do I disable the nearby printers list from displaying at all in the printers drop down list available from a print dialogue box?
    I have over a hundred Macintosh workstations on the same VLAN subnet that spans multiple buildings.
    Each group of machines is assigned a specific printer to print to and we need to only allow the user to know that the installed printer is their only option.
    Thank you for your time and consideration; I appreciate it.
    Best,
    TechieChica
    Harvard University

    This issue was finally resolved by focusing on the computers and/or printers announcing the multicast dns advertisement of available printers. When you need to disable printers from appearing in the "Nearby Printers" list, locate the machines advertising services and shut down the announcement; more below.
    If you are not certain which computer or printer is advertising its services, download a bonjour browser app first; I used:
    http://www.macupdate.com/app/mac/13388/bonjour-browser
    With that application launched, you can navigate down the browser list by expanding nodes and see which machines IP addresses are advertising an available printer service.
    Next, the remaining how-to requires you to know which machines IP addresses correspond with the machines.
    For Mac desktops, laptops, and servers that appear in the list, physically go to those devices and navigate the machine's System Preferences > Print & Fax  control panel and for each printer, make sure that the checkbox "Share this printer on the network" is unselected. Note that--if you already have not guessed--this will disable the ability for another machine to navigate and print to a shared printer on that machine. If, by necessity, that machine must share that printer, but you do not want its sharing to be discoverable, you must disable that machines multicast dns broadcast.
    Machines that must share printer queues where you would like to disable the machines multicast dns bonjour 'Printer Available' broadcast advertisement packets to remote machines in order to prevent them from showing up in Nearby Printer listings, you should follow the tutorial here:
    http://support.apple.com/kb/HT3789?viewlocale=en_US
    or here:
    http://blog.tsunanet.net/2010/02/how-to-disable-bonjour-on-osx-106-snow.html
    Lastly, nearby printers listings will pick up the 'Printer Available' dns bonjour advertisements of the printers internal network configurations as well. To disable those, most modern network printers have built-in web administration control panels available to you from a web browser. For example, open up safari, type http://the-numeric-IP-address-of-your-printer-here
    and then select the enter key. You should then be able to navigate to the Networking configuration web page available from the printers web administration interface and disable bonjour/multicast print settings. Most HP network printer installations for example, only need port 9100 and IPP sevices enabled for typical Macintosh and Windows network printing services to work...and all other Miscellaneous printer services may usually be disabled. If you are not the network administrator, check with them to confirm that no other special network applications require additional non-typical print services.
    That's it! Once you have disabled or hidden the print services advertisements, the machines on the local network subnet will no longer show Nearby Printers.
    Hopes this helps someone!
    Best,
    TechieChica

Maybe you are looking for