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.Diagnost ics.Process.Sta rt( 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.Diagnost ics.Process.Sta rt("c:\\windows \\system32\\not epad.exe","c:\\ x.txt"); work fine 5 7761
Can you post the code for Process.Start?
ShaneB
"mg" <mg@discussions .microsoft.com> wrote in message
news:6D******** *************** ***********@mic rosoft.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.Diagnost ics.Process.Sta rt( 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.Diagnost ics.Process.Sta rt("c:\\windows \\system32\\not epad.exe","c:\\ x.txt"); work fine
System.Diagnost ics.Process.Sta rt("c:\\progra m files\\adobe\\a crobat
6.0\\reader\\ac rord32.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******** *************** ***********@mic rosoft.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.Diagnost ics.Process.Sta rt( 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.Diagnost ics.Process.Sta rt("c:\\windows \\system32\\not epad.exe","c:\\ x.txt"); work fine
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:\exportfile s\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******** *************** ***********@mic rosoft.com... System.Diagnost ics.Process.Sta rt("c:\\progra m files\\adobe\\a crobat 6.0\\reader\\ac rord32.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******** *************** ***********@mic rosoft.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.Diagnost ics.Process.Sta rt( 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.Diagnost ics.Process.Sta rt("c:\\windows \\system32\\not epad.exe","c:\\ x.txt"); > work fine > >
Your code works! Thank you very much!
"ShaneB" wrote: 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:\exportfile s\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******** *************** ***********@mic rosoft.com... System.Diagnost ics.Process.Sta rt("c:\\progra m files\\adobe\\a crobat 6.0\\reader\\ac rord32.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******** *************** ***********@mic rosoft.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.Diagnost ics.Process.Sta rt( 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.Diagnost ics.Process.Sta rt("c:\\windows \\system32\\not epad.exe","c:\\ x.txt"); > work fine > >
Is there a way to replace c:\exportfiles\ d.pdf programatically . That is,
substitute another path before running the Start() method at runtime?
"mg" wrote: Your code works! Thank you very much! "ShaneB" wrote:
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:\exportfile s\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******** *************** ***********@mic rosoft.com... System.Diagnost ics.Process.Sta rt("c:\\progra m files\\adobe\\a crobat 6.0\\reader\\ac rord32.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******** *************** ***********@mic rosoft.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.Diagnost ics.Process.Sta rt( 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.Diagnost ics.Process.Sta rt("c:\\windows \\system32\\not epad.exe","c:\\ x.txt"); > > work fine > > > > > > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: songie D |
last post by:
H
If I us
Process.Start("DTSRun ...") on a computer that has SQL server installed, it can't fin
DTSRun, claiming 'file not found'. Despite this,
Shell("DTSRun...") from VB.NET works fine
It also works to run DTSRun from the command line without typing in the directory
as c:\program files\microsoft sql server\80\tools\binn is in the 'path'...
|
by: mg |
last post by:
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...
|
by: Wardeaux |
last post by:
All,
I've written a "setup" wrapper that calls a sequence of "setup.exe", and
all works except when I call the setup.exe for the MSDE, then it gets about
half way through and then hangs... The MSDE setup works fine from a CMD
prompt... anyone know of articles or known issues with this technique, and
what are my alternatives to having my...
|
by: LilBuh |
last post by:
Hello :)
this is a repost... i ve been looking for a way since last week ...
i have a template html file that i modify from my code... i need to print
this file without IE's Header and Footer
or any print dialog then once the printing's done... restore the original
Header and footer
but here's what happens:
- save the current header and...
|
by: PAPutzback |
last post by:
I am trying to decrpyt a gpg encrypted file but the process prompts for
a password.
The Process.start function is run in a service so I want to be able to
pass the password without any user intervention.
Thanks,
Phil
| |
by: henning.friese |
last post by:
Hello NG,
I'm need to write some code which creates tiff files from various
document types (doc, pdf, xls). I want to do this by ShellExecuting
(via System.Diagnostics.Process) the doc-files with the "print"-verb.
This works for me. However, I need to handle the case when a printing
application
doesnt't quit in a given timespan (for...
|
by: Paul |
last post by:
Hi,
I'm trying to kick off the iiscnfg.vbs from a webservice to export a
website's config to an xml file (And eventually populate other servers with
the config). I initially tried this using the 1.1 framework, but discovered
that when I used Process.Start() the user's credentials were not
impersonated, it just kept using the asp.net's user,...
|
by: Kirk |
last post by:
The following C# web service works fine until you uncomment the lines
setting UserName and Password. Then, Process.Start throws an
Access is Denied Exception. This is with .NET 2.0, of
course (1.1 does not support running a process as a different user).
I'm running everything on Windows Server 2003. I have impersonation
enabled
in my...
|
by: Ed Bitzer |
last post by:
When I use System.Diagnostics.Process.Start("D:\MyDialer.exe 123 456
1234") attmpting to run a dialer from my program, I get an error 5
"The system cannot fine the file specified" If I eliminate the
command line phone number, MyDialer is run but of course without the
necessary command line. Appreciate some help.
Ed
|
by: Kerem Gümrükcü |
last post by:
Hi,
i have a Process.Start call that fails with 267 Error Code
if invoked with another user and password other than the
applications user. It is a ordinary piece of code just create
a Process Object , fill its StartInfo and then go a process.Start(),
It works fine, unless i try to execute the process with another
user. Why, what do i have...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| | |