Popular Post ITJAY2023 Posted July 28, 2023 Popular Post Posted July 28, 2023 (edited) A big massive thank you to Ben Whitemore! After countless hours spent researching how to bypass universal print and deploy out a network printer I found a 100% working solution. The best thing is that it is actually really simple to deploy. So... The process is the following, we are going to create a Win32 App which has all of the printer drivers and two powershell scripts, one is a install script and the other is a uninstall script. We do not edit the scripts at all and instead set all of our parameters for printer ip, driver names etc in the install command itself. 1. Create a folder wherever you want to work out of, I chose C:\Temp 2. Download IntuneWinAppUtil.exe and place it in the temp folder 3. Create a new folder in Temp called Printer (C:\Temp\Printer) 4. Create two powershell scripts in the Printer folder by copying and pasting the code below Install-printer.ps1 Uninstall-printer.ps1 5. Download the printer driver for the printer and place all the files in the C:\Temp\Printer folder, the printer driver files will be where the .inf file is 6. Find out what the printer driver name is by opening the .INF file or by installing the printer driver and getting the driver name from the list 7. Open CMD as a Administrator and run the following command cd C:\Temp\ .\IntuneWinAppUtil.exe Source Folder: C:\Temp\Printer Setup File: Install-Printer.ps1 Output Folder: C:\Temp\Printer Catalog: N We have now created the Win32 App in C:\Temp\Printer and are now going to deploy the app via Intune 8. Go to Intune Admin Center, Apps, Add a App, Win32App and select the Win32App you just made 9. Enter the Install and Uninstall command and obviously change it to your driver name, ip etc (the bits in bold) Install Command: powershell.exe -executionpolicy bypass -file .\Install-Printer.ps1 -PortName "IP_192.168.1.1" -PrinterIP "192.168.1.1" -PrinterName "Printer Colour" -DriverName "TOSHIBA Universal Printer 2" -INFFile "eSf6u.inf" Uninstall Command: powershell.exe -executionpolicy bypass -file .\Uninstall-Printer.ps1 -PrinterName "Printer Colour" 10. Set the requirements to the below: 11. Set the Detection Rule to the following but change the bold text, so at the end of the keypath needs to be the printer name and the value needs to be the printer name. Rule Type: Registry Key Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\Printer Colour Value Name: Name Detection Method: String Comparison Operator: Equals Value: Printer Colour 12. Set your deployment groups / users 13. Thank this post 14. Have a great day! Do you need technical advice, SharePoint migration assistance, or have general Microsoft Cloud queries? Visit Contact Us - Holker IT for expert support and guidance. Edited December 2, 2024 by ITJAY2023 Shameless plug & Title update 6
mw184 Posted November 2, 2023 Posted November 2, 2023 Sorry to bring this thread back. Does anyone know how to get this working with Sharp Printers? They don't use the usual .INF files etc so I cannot get the required information from the driver. I have had a look online and no one seems to know how to do it in any of the guides or reddit threads I have looked at. I am also in touch with my printer supplier and support company but they seem to be stumped as well. Thanks in advance
chaplic Posted November 2, 2023 Posted November 2, 2023 I have sharp printers in an intunewin pacakge, looking at my source folder for the intunewin c:\windows\sysnative\pnputil.exe -a *.inf add-printerdriver -name "SHARP MX-M3071 PCL6" add-printerport -name "10.162.123.123:" -PrinterHostAddress 10.162.123.123 add-printer -name "Staffroom Jun 21" -driver "SHARP MX-M3071 PCL6" -port "10.162.123.123:" In the source folder is a lot of files including INF, I guess I got a download from sharp then used 7-zip to extract the files assuming there wasn't a cmdline switch. Failing that take a look at C:\windows\System32\DriverStore\FileRepository then install the drivers manually and then copy all the new files in FileRepository as these are what you need to install 1
mw184 Posted November 2, 2023 Posted November 2, 2023 How did you get the .INF and other files out of the driver installer? When I extract the driver using 7-zip this is all I get in the folder (see picture)
ITJAY2023 Posted November 2, 2023 Author Posted November 2, 2023 How did you get the .INF and other files out of the driver installer? When I extract the driver using 7-zip this is all I get in the folder (see picture) [ATTACH=CONFIG]70225[/ATTACH] You'll need to either get the universal driver or find a driver where it is a .zip file instead of a installer 1
Oaktech Posted November 2, 2023 Posted November 2, 2023 Can you not just deploy the driver as a software package like any other app? You can then set supersedence within InTune if you need to upgrade drivers in the future, at that point windows will find the appropriate driver? 1
chaplic Posted November 2, 2023 Posted November 2, 2023 (edited) Grab Innoextract and point it at the sharp installer innoextract - A tool to unpack installers created by Inno Setup (constexpr.org) I just did innoextract.exe ..\MX_D54_PCL6_PS_2103a_English_64bit.exe and it did the trick Edited November 2, 2023 by chaplic 2
chaplic Posted November 2, 2023 Posted November 2, 2023 Can you not just deploy the driver as a software package like any other app? You can then set supersedence within InTune if you need to upgrade drivers in the future, at that point windows will find the appropriate driver? From memory I think the installer doesnt have a silent option.. 2
mw184 Posted November 3, 2023 Posted November 3, 2023 Just wanted to say a quick thanks to everyone who helped. I have managed to get a Win32 app created and it is currently deploying over intune as we speak. Also thank you for the heads up about innoextract, that tool is fantastic and worked first time!
cheekycharly Posted February 2, 2024 Posted February 2, 2024 Just found this thread and thought I'd give it a go but hit an error during install. CND0183LX4 [email protected] Windows 10.0.22631.3085 1.3 Failed 0x80070001 01/02/2024, 11:27:29 Trying to push out one of our Kyocera TASKAalfa 4053ci Copiers.
mw184 Posted February 2, 2024 Posted February 2, 2024 In the end I abandoned the deployment via Intune. With the help of our Printer Supplier I ended up installing PaperCut Mobility Print on the Print Server and set the printer up to be accessed through it. Deployed the PaperCut software via Intune (worked a treat and was a doddle with a full guide for it) and published the needed link via Teams so it was always available. Wish I had gone down this route to start, works well and is reliable. Pupils just need to click that link through Teams and it sets the printer up for the and away it goes.
cheekycharly Posted February 2, 2024 Posted February 2, 2024 Wish I could follow suite. Once this current DC is done with I wont be firing up a box just to share printers from as i'm wanting fully serverless. If i come in one morning and something is down its either Broadband, Switches, Firewall, O365. Nice and simple. 1
mw184 Posted February 6, 2024 Posted February 6, 2024 Might be worth looking into PaperCut's fully cloud based service for that. Much more reliable and manageable, plus support is available as it is a paid service. When I get to the state of no onsite servers (plan to go to the cloud fully as well), I will be looking down this route after the experience I have had with their products so far
EssentialRug Posted February 27, 2024 Posted February 27, 2024 (edited) Having a bit of an issue with this. Have followed steps and the printer installs on the device but keep getting the error around detection. I've tried a few different registry entries for detection but still seems to be failing despite the key being there. Have checked the Intune logs on the device and it says applicationDetected: False. Any idea where I'm going wrong here? Have attached screenshots... EDIT: Here is my detection policy: Key Path: Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts Value name: House Office Canon Detection Method: Value exists Edited February 27, 2024 by EssentialRug
chaplic Posted February 28, 2024 Posted February 28, 2024 So you're looking in hkey_current_user, but what account is the install /detection running as - system?
EssentialRug Posted February 29, 2024 Posted February 29, 2024 So you're looking in hkey_current_user, but what account is the install /detection running as - system? Yes...but also tried with the key mentioned in this thread which looks in hkey_local_machine and didn't work either...
chaplic Posted February 29, 2024 Posted February 29, 2024 Pop up a command prompt running as system, go into regedit and see if that key is present.
EssentialRug Posted February 29, 2024 Posted February 29, 2024 Pop up a command prompt running as system, go into regedit and see if that key is present. Yup...it's there.
ITJAY2023 Posted February 29, 2024 Author Posted February 29, 2024 Double check your KeyPath, you sent it as a space. (highlighted in red) "Key Path: Computer\HKEY_CURRENT_USER\Software\Microsoft\Wind ows NT\CurrentVersion\PrinterPortsValue name: House Office CanonDetection Method: Value exists"
EssentialRug Posted March 4, 2024 Posted March 4, 2024 Double check your KeyPath, you sent it as a space. (highlighted in red) "Key Path: Computer\HKEY_CURRENT_USER\Software\Microsoft\Wind ows NT\CurrentVersion\PrinterPortsValue name: House Office CanonDetection Method: Value exists" Hmm, yeah that's all good too. I think just some weirdness when I copy and pasted it from Intune, but theres definitely no space in the policy...
ITJAY2023 Posted March 4, 2024 Author Posted March 4, 2024 Would you be able to screenshot the configuration of the win32 app deployment and settings just so I can go over them
EssentialRug Posted March 4, 2024 Posted March 4, 2024 Would you be able to screenshot the configuration of the win32 app deployment and settings just so I can go over them Of course, please find below. Thanks so much for taking a look.
ITJAY2023 Posted March 4, 2024 Author Posted March 4, 2024 Just do this for me Key Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\(insert printer name)Value name: NameDetection Method: String ComparisonOperator: EqualsValue: (insert printer name) The detection 100% needs to be Local Machine and not user
EssentialRug Posted March 5, 2024 Posted March 5, 2024 Just do this for me Key Path: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\(insert printer name)Value name: NameDetection Method: String ComparisonOperator: EqualsValue: (insert printer name) The detection 100% needs to be Local Machine and not user Just remade the whole thing from scratch, but same outcome and same error regarding detection.
Reverend_Dan Posted March 6, 2024 Posted March 6, 2024 Just checked mine, you need the Value name to be Name It to looks for the string called Name then the value of what you have set the printer to be called. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now