10 Replies Latest reply on Aug 26, 2016 11:19 AM by Rick Heckbert

    Need to uninstall client over network using SCCM

    Newbie

      We have both signup and uniprint 8.2 clients deployed through SCCM on our campus. We now need to uninstall the clients from some labs but have not been able to find any information on if it would be possible to uninstall silently and unattended using command lines. Any help will be much appreciated.

        • Re: Need to uninstall client over network using SCCM
          Jeff Geller Guide

          He Jeffery,

           

          Thank you for the question.

           

          The Signup and Popup client software is an executable (EXE) which is not easily distributed via SCCM because when installing a package using a Windows GPO it will allow only you to install "Installer Files" of type ".msi" (Microsoft Installer).

           

          There is a Knowledge Base article on Microsoft's web site explaining how to wrap the Pharos Package executable into an MSI file using a ZAP file.

          http://support.microsoft.com/kb/231747

           

          For uninstalling the Popup package does not have a command line mechanism to uninstall it. The uninstaller can be run by running the uninst.exe in the ..Pharos\bin directory but might not be easily automated if at all.

           

          For uninstalling the Signup client this is the same but it will prompt for a reboot after it is done.

           

          Let me know if this helps.

           

          Regards,

          Pharos Systems

          Jeff Geller

            • Re: Need to uninstall client over network using SCCM
              Jason Lee Adventurer

              The lack of an uninstaller is highly annoying, especially since there is a quiet "installer" parameter.

               

              Regardless, I'm working on an AutoIT script to do the uninstall Uniprint's popup client and have for the most part been successful so we can push either with SCCM, GPO or ManageEngine.  The only help is the KB article Pharos Support :: powered by RightNow Technologies. is a bit lacking in details and does not 'Truely' give all the info to uninstall... following it exactly still leaves several registry entries pertaining to both the Pharos client and the printers/queues installed.

               

              The one point I'm hitting a roadblock on is Windows 8 as it seems to add additional registry entries, from what I can tell, in order to map to the Metro 'Devices' panel and a few other underlying print subsystem changes.  Using the rundll32 printui.dll method or simply deleting the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers, which work on XP - Win7, doesn't cut it.   The powershell command Remove-Printer works, but I'm trying to figure out a way without using powershell.

               

              I noticed that during the Uniprint install, their package uses a program print.exe that seems to be their printer 'installer'. I haven't yet tried to extract that and play with it to see if it can be used, but again that is an external app and I'd almost just use the powershell call then.  I'm going through to see if deleting the extra reg entries will work and detailing (as well as asking for help) on Experts-Exchange (Manually deleting local printer in Windows 8: registry printer).

               

              Again, the lack of an automated uninstaller is extremely annoying because with what they've coded to date, they've basically got 80%-90% of the work done, code in place.  The fact that I have an AutoIT script that seems to work (up to Win7) with only a day or two of work means it's not that difficult and should be offered.   That or at least the Installer should have an option to remove existing printers.  Migrating servers, clean installs etc is a big and necessary job from time to time vs just upgrading and this requires re-initing the client from scratch.  We had to do this once when we moved from v6.5 to 8.0 where the 8.0 Installer would NOT install over the 6.5 and now again that we moved to a new server, v8.4 from scratch (WinSrv 2012, new srv IP, etc).  I wish Pharos would address this issue, soundly and effectively.

                • Re: Need to uninstall client over network using SCCM
                  Mark Meszar Wayfarer

                  We would also like to see a silent uninstaller from Pharos and I think Jason does a great job of summing up the problem we see as well.

                  2 of 2 people found this helpful
                  • Re: Need to uninstall client over network using SCCM
                    Jeff Geller Guide

                    Hi Jason,

                     

                    What I have done regarding removing the Popup client involves 3 files.

                     

                    1. A Windows Batch file that executes a VBScript.

                    +The Batch file is responsible for calling the VBScript and removing the Popup components

                    2. The VBScript itself.

                    +This removes a Windows Printer Object and associated printer driver it is using

                    3. The Uniprint Popup executable called "CTskMstr.exe".

                     

                    How it works:

                    Currently the 3 files work in tandem.  The batch file calls the VBScript passing it a printer name to delete then attamepts to delete the driver associated to it. The batch file then continues to remove the Popup components.

                     

                    The vbscript can be used for a single printer name and I put some comments in the script at the top on what to modify.

                     

                    The VBScript takes this string and deletes all printers that contain the string passed into it. The more specific the string is the more explicit it will be in deleting printers.  If you pass the the printer name "a"then it may delete more printers than desired as long as they contain the letter "a" in the name somewhere.  If you pass it "My Funny Printer" it will more explicit and will look for that printer name only. The VBScript will also delete the driver associated to the printer.  The caveat is that if the driver is associated to more than one printer and you are deleting only one of them the driver will not be removed, this is a Windows-ism.

                     

                    The VBScript removes the registry key you indicated "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers" when it deletes the Windows printer object.

                     

                    I have tested this on Windows 7/8 x86/x64 Professional with success. I installed the Popup Client and it removed all the pieces I expected.

                     

                    I Agree a silent uninstall switch would be nice.  I hope this helps for the time being.

                     

                    Here is a link you can use to download the 3 files in a zip file.  As long as they are all in the same directory you can run the batch file from a command prompt and pass it the printer name or the batch file can be modified to use a specific name and run directly. I typically recommend running it with administrative credentials to help it failing due to credentials as it does attempt to stop and start a service.

                     

                    https://private.filesanywhere.com/pharos/fs/v.aspx?v=896c628659979eb3a397

                     

                    If you have any questions let me know.

                     

                    Regards,

                    Jeff Geller

                    Pharos Support

                      • Re: Need to uninstall client over network using SCCM
                        victor roque Newbie

                        Hi Jeff,

                         

                        Could you make the .zip file containing the 3 files you mentioned available for download again?

                         

                        Thanks!

                          • Re: Need to uninstall client over network using SCCM
                            Jeff Geller Guide

                            Hi Mark,

                             

                            Here is another link to the file.  You need to simply enter a Site Code to download.

                             

                            https://private.filesanywhere.com/pharos/fs/v.aspx?v=896d688b5e9ea5baa99e

                             

                            I have modified this version slightly from the previous original script in that this one will only remove printer objects in Windows that are Pharos Popup printers.  It iterates through the "..Pharos\Popup Client\LocalPrinters" registry key and only removes printers found for Uniprint.  It will then attempt to remove the associated printer driver as well but if the driver is in use by a non Pharos printer object the driver will not be deleted.  Lastly it then removes the registry keys, files and folders and restarts the Windows Print Spooler service on the client.

                            From the header of the vbscript there is additional information about what it does.  You will also find the sections listed below in the script which outline the actions it is taking as it moves along.

                             

                            Section 1 -- Determine if the OS is 32-bit or 64-bit and set the registry key appropriately

                            Section 2 -- First obtain the names of the Popup Printers installed from the registry

                            Section 3 -- Check if we found any Pharos printer - If YES then count the number and set Found to 1

                            Section 4 -- If we found Popup printers ReDimension the array to hold data and set number found

                            Section 5 -- Enumerate all the printers on the local machine

                            Section 6 -- Sleep the script to allow the printer object to be deleted then delete the driver

                            Section 7 -- Now using the Array we built delete the drivers the Popup Printers were using

                            Section 8 -- Now execute the required batch file to remove the Popup components

                             

                            Lastly there are additional WScript.Echo lines that can be removed or commented if you choose, the same as the batch file has some ECHO lines that can be removed if you like.

                             

                            Let me know if you have any questions.

                             

                            Cheers,

                            Jeff Geller

                            1 of 1 people found this helpful
                              • Re: Need to uninstall client over network using SCCM
                                Jason Lee Adventurer

                                Thanks Jeff, sorry I didn't respond right away.  I'll take a look at your script to see what I was missing, particularly to get it to fully uninstall in Windows 8.  I never did get a answer from my other posts (external forums) as to why the normal printui calls do not fully remove a printer on Win8 and/or what the details to the obvious printer extentions for Win8 are.

                                 

                                I went ahead and went with invoking the powershell Remove-Printer function if Windows 8 was detected from within my AutoIT script; we were in a time crunch so I finished it by the end of the month of my posting and it seemed to work well for our purposes.  I'm sure you're a better coder than I and it looks like your modified script addresses the issues soundly; so unless I see any Eureka points about the Win8 issue or I see my script has some added functionality, I'll defer to yours rather than post mine.

                                • Re: Need to uninstall client over network using SCCM
                                  Mark Meszar Wayfarer

                                  Jeff, the modified script works great and we've tested it against Windows 7 and 8.1 using SCCM and everything works as advertised. We really appreciate the time and effort you've put in on this.

                                  • Re: Need to uninstall client over network using SCCM
                                    Rick Heckbert Wayfarer

                                    Hi Jeff,

                                     

                                    We're moving a campus that had its own system to be under the umbrella of our main system and so need to uninstall the current packages.  I'd love to do this via LANDesk instead of manually needing to touch every machine so would it be possible to get access to your uninstaller scripts?  I tried the links above but they aren'w working any longer.

                                     

                                    Is there a better way to uninstall now that supersedes your script?  The old system is on 8.4 and the enterprise system we are migrating them to is 9.0r2 if that makes any difference.  The new packages are 9.0r2 as well

                                     

                                    Thanks!

                                    Rick

                          • Re: Need to uninstall client over network using SCCM
                            Mark Meszar Wayfarer

                            Hi Jeff,

                             

                            I'd like to thank you for working so quickly on this. I started a script to do something similar to what you created and it looks like you are much further ahead than anything I was working on. Next week we'll be testing your script extensively and really appreciate your efforts.

                             

                            Mark