Print management issue: cannot remove printer.



  • Server
    • FOG Version: Running Version 1.4.2
    • OS: Debian 8.x
    Client
    • Service Version: 0.11.12
    • OS: Windows 7 x64
    Description

    Howdy, I’m fairly new to FOG but I’ve gotten things up and running this week so we can do away with our Ghost licensing shortly. Pretty much everything is working exactly how it is supposed to on my end: inventory, pulling images, deploying images, multicasting, domain member management, hostname changing, and even adding printers.

    The one issue I am having is that removing printers does not function. Even worse is that after the printer has been removed from the host, the printer still appears for new users on the machine, ones who hadn’t ever previously logged in on that computer and thus had no printers associated with their account locally. The printer is also re-adding after manual removal, I’m guessing due to registry entries for the printer.

    The client log file hasn’t given me any idea how to fix this, but here it is:

    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     6/13/2017 6:43 PM Client-Info Client Version: 0.11.12
     6/13/2017 6:43 PM Client-Info Client OS:      Windows
     6/13/2017 6:43 PM Client-Info Server Version: 1.4.2
     6/13/2017 6:43 PM Middleware::Response No Printers
    ------------------------------------------------------------------------------
    

    Has anyone found an elegant solution to fix this that doesn’t involve manually flushing out registry entries? Or maybe I’m doing something stupid and I just haven’t been using FOG long enough to realize it…

    Any feedback would be greatly appreciated. TIA.


  • Moderator

    @dambron I feel I should add - printer management in fog has different modes. ‘Add only’ will only add printers, not remove.

    There are two other modes. I don’t remember what they are but - one only manages printers that are in fog, the other only allows fog assigned printers.

    So for the managed printer to be managed by fog and removed by fog, the printer must still exists in fog, but be removed from the host via fog.

    The other option is much more tougher in my opinion but suites some well. The last is fog manages all printers on a box - if they are not assigned then fog removes it, doesn’t matter if it’s a fog printer or not. Local usb isn’t possible in this setup without creating a printer of the same name in fog and assigning it. I don’t recommend this option.

    Looking at the logs, I’d say you are in ‘Add only’ mode.



  • @Sebastian-Roth said in Print management issue: cannot remove printer.:

    @dambron
    This is what the fog-client used to manage printers on Windows clients. Maybe try calling those by hand and see if it properly cleans it all up. Start a cmd window as Administrator and run:

    rundll32.exe printui.dll,PrintUIEntry /dn /n "\\*server*\NCC2100"
    rundll32.exe printui.dll,PrintUIEntry /gd /n "\\*server*\NCC2100"
    

    Huh, well that seems to work just fine, which I guess makes sense. I know that if you add a printer using

    RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n\\computername\printername
    

    Then you can’t remove that printer using the traditional add/remove method in Windows, you must run the /dn /gd commands to remove it.

    So it looks like it’s being added properly but the remove command isn’t working for some reason. Very interesting… at least I feel like I understand what’s happening now, if not why! Thanks so much for the assistance.


  • Developer

    @dambron
    This is what the fog-client used to manage printers on Windows clients. Maybe try calling those by hand and see if it properly cleans it all up. Start a cmd window as Administrator and run:

    rundll32.exe printui.dll,PrintUIEntry /dn /n "\\*server*\NCC2100"
    rundll32.exe printui.dll,PrintUIEntry /gd /n "\\*server*\NCC2100"
    


  • @Sebastian-Roth said in Print management issue: cannot remove printer.:

    @dambron Sorry this has been unanswered for some days. I’ve had this on my list but couldn’t find the time to spin up a test setup as I don’t usually have windows clients around.
    @Moderators Is anyone of you able to replicate this issue?

    Even with the FOG client removed and after removing both the printer and computer from the FOG console, the printer still adds any time an account logs in to Windows. So back to my original theory, it’s the registry entry for the printer. Somehow the way that FOG is adding the printer enforces it through the registry for every user after it is added, even if you “remove” it via FOG.

    In order to prove this I flushed out every entry for the printer in the registry using a manual search of the registry, and now the printer no longer automatically adds for every user.

    Just for the hell of it, here’s what the log shows when I add and then “Remove” a printer.

    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     6/22/2017 10:58 AM Client-Info Client Version: 0.11.12
     6/22/2017 10:58 AM Client-Info Client OS:      Windows
     6/22/2017 10:58 AM Client-Info Server Version: 1.4.2
     6/22/2017 10:58 AM Middleware::Response Success
     6/22/2017 10:58 AM PrinterManager Adding printers
     6/22/2017 10:58 AM Printer Adding: \\*server*\NCC2100
     6/22/2017 10:58 AM PrinterManager PrintUI return code = 0
     6/22/2017 10:58 AM PrinterManager Invoking add \\*server*\NCC2100 for all users
     6/22/2017 10:59 AM PrinterManager PrintUI return code = 0
     6/22/2017 10:59 AM PrinterManager Restarting spooler
    ------------------------------------------------------------------------------
    
    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     6/22/2017 11:01 AM Client-Info Client Version: 0.11.12
     6/22/2017 11:01 AM Client-Info Client OS:      Windows
     6/22/2017 11:01 AM Client-Info Server Version: 1.4.2
     6/22/2017 11:01 AM Middleware::Response Success
     6/22/2017 11:01 AM PrinterManager Adding printers
     6/22/2017 11:01 AM PrinterManager \\*server*\NCC2100 has already been configured
    ------------------------------------------------------------------------------```
    
    ------------------------------------------------------------------------------
    --------------------------------PrinterManager--------------------------------
    ------------------------------------------------------------------------------
     6/22/2017 11:06 AM Client-Info Client Version: 0.11.12
     6/22/2017 11:06 AM Client-Info Client OS:      Windows
     6/22/2017 11:06 AM Client-Info Server Version: 1.4.2
     6/22/2017 11:06 AM Middleware::Response No Printers
    ------------------------------------------------------------------------------
    


  • @Wayne-Workman said in Print management issue: cannot remove printer.:

    @dambron said in Print management issue: cannot remove printer.:

    after manual removal, I’m guessing due to registry entries for the printer.

    Sounds like group policy is adding the printer. If the FOG Client were doing it, it’d be plainly written in the fog log.

    The test group for this print issue happens to be an IT training room with 12 identical machines. I only added the printer to 4 of them via FOG and the others don’t have any printers managed or showing up. All the machines belong to the same OU, so it’s not a policy being applied at the computer level. It’s also not at the user level because I’ve tried a multitude of users and we don’t use GPO to manage any print settings at all generally. For the heck of it I browsed through and don’t see any local group policies that were applied, so I don’t think it has anything to do with GPO at all.


  • Moderator

    @dambron said in Print management issue: cannot remove printer.:

    after manual removal, I’m guessing due to registry entries for the printer.

    Sounds like group policy is adding the printer. If the FOG Client were doing it, it’d be plainly written in the fog log.


  • Developer

    @dambron Sorry this has been unanswered for some days. I’ve had this on my list but couldn’t find the time to spin up a test setup as I don’t usually have windows clients around.
    @Moderators Is anyone of you able to replicate this issue?



  • It occurs to me that this issue must relate to one of two things:

    1.) Either the way FOG adds a printer is causing an issue, since the printer reappears after manual removal when the same or any other domain user logs in again. I can manually add and remove network printers all day long and it works just fine.
    or
    2.) FOG is not actually trying to remove the printer once it has been removed from the host using the printer management tab in the console, and is in fact still trying to add the printer to the hosts continually. I haven’t seen any failures or log errors, so I am leaning more towards this being the case.

    I am using the “FOG Managed Printers” option for the group/hosts, I assume this is correct? Do you know of anything else I could check on the FOG side of things?



  • @Tom-Elliott Sorry I should have added that I already tried rebooting them several times after updating the host print settings. I also went through and double checked all of the server settings that I could think of and didn’t see anything out of the ordinary.

    I really wish I was getting a specific error message from FOG but there’s nothing at all, and every other component works seamlessly! Maybe I will just have to live without print management. I actually don’t mind so much but I feel like it would benefit our helpdesk team a lot.

    I’m home from the office now and need a break from this stuff, but I’m going to go through the windows logs more thoroughly tomorrow to see if this could be a windows issue, or maybe even a permissions issue? I dunno, I’m just brainstorming here cause I’m at a loss.


  • Senior Developer

    I’d recommend seeing if rebooting might help? I didn’t see if that had happened or not.

    I only suggest trying this because of the “even other users logged in see it” type issue you are describing.

    The Printer add element is a nicety, but it’s typically a “user based” thing for the default. The FOG Client doesn’t run as a logged in user, rather it runs as the “SYSTEM” (Windows root if you will) user. Adding printers is pretty simple, but removing them is not so elegant (and I’m fairly sure this isn’t a problem in coding though I’m also no good with C# language). The reboot should ensure the printer “traces” would be lost.


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.