CMD has a maxium size for a "command line" at about 8k... What are you trying to do?
Main Topics
Browse All TopicsWhen I run this code it will start the cmd process twice then the third time it gives an unhandled exception "Access is denied". What is going on and how do I fix it?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The example I posted was an a test case showing where the problem was occurring. The second example is was what the current program I am replacing is doing that works. It seems that both should work.
Anyway when I try your suggestion I'm getting a compile error.
"Operator '&' cannot be applied to operands of type 'string' and 'string'"
There is no file called
<?xml version="1.0" ?>
<QBXML>
<QBXMLMsgsRs>
<InvoiceQueryRs statusCode="0" statusSeverity="Info" statusMessage="Status OK">
<InvoiceRet>
<TxnID>39C6BB-1220637230</Txn
<TimeCreated>2008-09-05T13:5
either. This is part of the parameter I'm trying to pass to a command line program so that it can process it. It doesn't seem to matter what I pass. Once it exceeds a certain length I get the access is denied error when using process.start.
When I try using the example you gave it says it can't find the file.
So, write the XML data to a file, and then use that file name as an argument when doing a Process.Start
"PrintInvoice
The name of the file should make the command line too long.... it'd be something like this:
PrintInvoiceVer.exe C:\Temp\SomeFile.xml
Business Accounts
Answer for Membership
by: turn123Posted on 2008-11-03 at 08:31:30ID: 22868387
Using VS 2008 to compile and OS is XP Pro if it makes any difference.