473,320 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Install printer programmatically

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
0 2343

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Umesh | last post by:
Hi all I am trying to change the printer(like paper source ,etc) setting in C#. But i am unable to do it. I am not sure how to do it. should i have to use WIN API like Openprinter , getprinter ,...
1
by: akhosravi4703 | last post by:
I'm having a problem with an application I pushed out recently. First, some background The application was made with Access 97 (unfortunately I'm stuck with this older version for the moment)...
1
by: slk23 | last post by:
Hi, I'd like to programmatically change the "Keep Printed Documents" option for a printer. The option is available in the Windows UI by going to the Advanced tab on the printer's Properties...
1
by: Alphonse | last post by:
Hi, If I check the printers & faxes ->file ->server properties There are lot of forms (Envelope, letter, etc). I could add my custom form too, in this case I add a custom form, named...
2
by: ExitusLSU | last post by:
Is there a way to change the DEFAULT printer settings for an installed printer? I want it to change the printer settings for a specified printer at the whole OS/Windows level, not just for the...
2
by: Terry Olsen | last post by:
Can anyone give me some guidance on installing a local printer with VB 2005? I'm guessing I would probably do this with WMI, but i'm not finding anything obvious. I see how to add a networked...
2
by: =?Utf-8?B?Qm9vazIwNDc=?= | last post by:
I am stumped. I lost my printer about a week ago and cannot reinstall it. When I try it tells me that the specified print monitor cannot be found. I have a Dell computer with Windows XP and a...
3
by: Steve | last post by:
Hi All I have a Windows forms POS program and have windows xp printer drivers for the Posiflex printers the customers use Is it possible to automatically install a windows printer driver (and...
0
by: jigsmshah | last post by:
i am working on a project (windows service using VB.Net and C#) which gets the check details and check images from the database and prints the check to a printer. Printer name is configured in a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.