By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Install printer programmatically

P: n/a
I'm trying to install a printer driver using this code:

Process p = new Process();

ProcessStartInfo pSI = new ProcessStartInfo("rundll32");

pSI.UseShellExecute = false;
p.StartInfo = pSI;

p.StartInfo.Arguments = "printui.dll,PrintUIEntry /ia /m \"Epson EPL-5700\"
/h \"Intel\" /v \"Windows 2000 or XP\" /f \"%windir%\\inf\\ntprint.inf\"
/u";

p.Start();

p.WaitForExit();

After execution a pop up appear which says: "The arguments are invalid". If
i run the command in console it works. Do you have any idea on why it
happens or any suggestion to do the same stuff using a different method?

Thanks in advance
Oct 1 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.