Printer Configuration File not applied
-
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.csPrintUI($"/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.
-
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.
-
@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
-
@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.
-
@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.
-
@sebastian-roth Thank you very much !
-
@tatanas said in Printer Configuration File not applied:
Thank you very much !
You are welcome. And so I guess this means, yes it works!?
-
@sebastian-roth Sorry, I didn’t see your answer. Yes it works.