You're not handling the quotation marks properly. In addition, I removed
the "+" signs because they weren't in your command prompt version...which
you said works. Anyway, the line should be:
@"/t ""c:\exportfiles\x.pdf"" ""HP LaserJet 3300 Series PCL 6"" ""HP
LaserJet 3300 Series PCL 6"" ""DOT4_001""";
This is now equivalent to what you stated in your first post:
acrord32.exe /t "c:\exportfiles\x.pdf" "HP LaserJet 3300 Series PCL 6" "HP
LaserJet 3300 Series PCL" "DOT4_001"
I recommend using a MessageBox to test code like this... That way you can
see what the strings will look after all the formatting is done.
ShaneB
"mg" <mg@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
System.Diagnostics.Process.Start("c:\\program files\\adobe\\acrobat
6.0\\reader\\acrord32.exe",@"/t c:\exportfiles\d.pdf 'HP LaserJet 3300
Series
PCL 6' + 'HP LaserJet 3300 Series PCL 6' + 'DOT4_001'");
BUT THIS DOESN'T WORK!
"ShaneB" wrote:
Can you post the code for Process.Start?
ShaneB
"mg" <mg@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com... > The following .exe and its parameters work correctly from the command
> prompt
> (it prints x.pdf without prompting the user.
>
> acrord32.exe /t "c:\exportfiles\x.pdf" "HP LaserJet 3300 Series PCL 6"
> "HP
> LaserJet 3300 Series PCL" "DOT4_001"
>
> But, I have not been able to use the exe and its parameters as
> arguments
> #1
> & #2 in System.Diagnostics.Process.Start( arg1 , arg2) when runnning
> this
> line in the code behind of a Visual Studio WebForm
>
> I have given ASP.NET all permissions, so commands like
> System.Diagnostics.Process.Start("c:\\windows\\sys tem32\\notepad.exe","c:\\x.txt");
> work fine
>
>