c# - How can I install a printer using .NET? -
I have .INF for a virtual printer that I want to install from a .NET application. I did this before using batches scripts, but I'm looking for a snippet of code to do it in the .NET Framework.
There is nothing special about the printer .INF, so any code that installs a printer will work from the INF on C # or VB Net.
I believe it is possible by interop through Win32 APIs, but me Its a lot more easily system Diagnostics To use the process (), we have got it through printui.dll:
rundll32.exe printui.dll, printUIEntry?
Perhaps you are already using the mentioned batch script, but if the parameters are not documented here:
Just make sure to test it against everyone Operation system needs to support you. Some options are not present in either all Windows releases or their names have changed (although I think they are more esoteric options - installing the INF on board Will.)
Comments
Post a Comment