How can I automate below wizard using C# so that I can install "XPS Class Printer Driver" for my virtual printer.
I have created a installer by which I have created printer and port but problem is I want to use Microsoft XPS Printer Driver which is not installed on machine. I can install it from above Printer driver wizard but couldn't found a way to automate it via C#.
I know we can use DRIVER_INFO_6 or Management api but don't know how ?
Thanks !

Microsoft XPS Printer Driver is installed as part of the Windows feature "Microsoft XPS Document Writer".
Control Panel -> Programs -> Programs and Features -> Windows Features
You can enable this feature programmatically via the command line (with elevated/administrator privileges).
Using C# you can run the command using Process.Start. You may need to modify your application's app.config and use runas.exe to achieve elevated privileges necessary for the dism command.