• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Printer Configuration File not applied

Scheduled Pinned Locked Moved
Bug Reports
2
8
701
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    tatanas
    last edited by tatanas May 13, 2022, 5:13 AM May 13, 2022, 11:12 AM

    Hi,

    I was trying to modify the printer configuration (black instead of color) through Fog printer management and it was not working.
    I saw that the command in WindowsPrinterManager.cs

    PrintUI($"/Sr /n \"{printer.Name}\" /a \"{printer.ConfigFile}\" m f g p", verbose);
    

    is executed with a /q parameter at the end (line 37 in the same file : cmdLine = cmdLine + " /q";)

    When executed without the /q parameter, the printer config is modified sucessfully.
    When executed with /q at a different position (before /Sr), the printer config is modified sucessfully.
    Could you confirm this behaviour and fix the code if necessary ?

    Thank you.

    T 1 Reply Last reply Nov 23, 2022, 8:04 AM Reply Quote 0
    • T
      tatanas @tatanas
      last edited by Nov 23, 2022, 8:04 AM

      Sorry to bump this topic, can someone confirm this problem ?
      If the fix is possible, could it be applied to the next fog update ?

      Thanks for your time.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Sebastian Roth Nov 23, 2022, 3:34 AM Nov 23, 2022, 9:30 AM

        @tatanas Thanks for bringing this topic up again. Obviosly got lost in the forums.

        I don’t have a setup with printer in my test environment and so I can’t confirm this being an issue. But I can make the change in the code no problem.

        Though I really wonder why position of parameters seem to make the command fail. This is very rare. Maybe there is something else in this command wrong?!

        Update: Well maybe the m f g p has to be the last bit…

        By the way, what do you think about this issue reported on github? https://github.com/FOGProject/fog-client/issues/139

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        T 1 Reply Last reply Nov 25, 2022, 2:41 PM Reply Quote 0
        • T
          tatanas @Sebastian Roth
          last edited by Nov 25, 2022, 2:41 PM

          @sebastian-roth
          After reading the doc of the PrintUIEntry command, it seems that when you use the /sr parameter, all the values have to be placed at the end of the command :
          /Sr Specifies what information about a printer is restored and how conflicts in settings are handled. Use with the following values placed at the end of the command line
          So when you add ‘/q’ parameter after the m f g p values it could generate a problem ?

          I dont know if this github issue is the same as mine. I should try the g/u value and compare results.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth Nov 26, 2022, 9:42 AM Nov 26, 2022, 9:28 AM

            @tatanas said in Printer Configuration File not applied:

            So when you add ‘/q’ parameter after the m f g p values it could generate a problem ?

            Yes I think you are right. I just pushed a fix on github. This fix will be in the next fog-client (and the new FOG) release.

            Update: You can download a fixed DLL if you like. Just stop the FOGService on the client machine, rename the original file C:\Program Files (x86)\FOG\Modules.dll (e.g. to Modules_orig.dll) and copy the downloaded file in place with the original name. After starting the service it should apply your printer settings.

            I dont know if this github issue is the same as mine. I should try the g/u value and compare results.

            Sorry for mixing up the issues and miss-using your topic to ask about this! The github issue is different. Don’t worry about this for now. I just updated the github issue.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            T 1 Reply Last reply Nov 28, 2022, 7:11 AM Reply Quote 0
            • T
              tatanas @Sebastian Roth
              last edited by Nov 28, 2022, 7:11 AM

              @sebastian-roth Thank you very much !

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by Nov 29, 2022, 4:25 PM

                @tatanas said in Printer Configuration File not applied:

                Thank you very much !

                You are welcome. And so I guess this means, yes it works!?

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                T 1 Reply Last reply Dec 2, 2022, 12:12 PM Reply Quote 0
                • T
                  tatanas @Sebastian Roth
                  last edited by Dec 2, 2022, 12:12 PM

                  @sebastian-roth Sorry, I didn’t see your answer. Yes it works.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    3/8
                    Last post

                  150

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project