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

Add Printer Wizard

P: n/a
Hi all,

I want to run that add printer wizard and i'm using this:

System.Diagnostics.Process.Start("rundll32.exe
shell32.dll,SHHelpShortcuts_RunDLL AddPrinter")

And i'm getting this error:
An unhandled exception of
type 'System.ComponentModel.Win32Exception' occurred in
system.dll

Additional information: The system cannot find the file
specified

whats the right code...

NEED HELP !!!!!!!

Thanx
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "Will" <an*******@discussions.microsoft.com> scripsit:
I want to run that add printer wizard and i'm using this:

System.Diagnostics.Process.Start("rundll32.exe
shell32.dll,SHHelpShortcuts_RunDLL AddPrinter")

And i'm getting this error:
An unhandled exception of
type 'System.ComponentModel.Win32Exception' occurred in
system.dll

Additional information: The system cannot find the file
specified


Sorry for posting the wrong code some days ago. This works for me:

\\\
Dim psi As New ProcessStartInfo
psi.FileName = "rundll32.exe"
psi.Arguments = "shell32.dll,SHHelpShortcuts_RunDLL AddPrinter"
System.Diagnostics.Process.Start(psi)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
Thanx Alot .. it did work .. you're code was great and
dont worry about the other time .. we all have our
moments!
-----Original Message-----
* "Will" <an*******@discussions.microsoft.com> scripsit:
I want to run that add printer wizard and i'm using this:
System.Diagnostics.Process.Start("rundll32.exe
shell32.dll,SHHelpShortcuts_RunDLL AddPrinter")

And i'm getting this error:
An unhandled exception of
type 'System.ComponentModel.Win32Exception' occurred in system.dll

Additional information: The system cannot find the file specified
Sorry for posting the wrong code some days ago. This

works for me:
\\\
Dim psi As New ProcessStartInfo
psi.FileName = "rundll32.exe"
psi.Arguments = "shell32.dll,SHHelpShortcuts_RunDLL AddPrinter"System.Diagnostics.Process.Start(psi)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.