Click here to Skip to main content
15,907,001 members
Home / Discussions / C#
   

C#

 
GeneralRe: WCF basic samples Pin
George_George5-Aug-08 15:50
George_George5-Aug-08 15:50 
Questionuser control Pin
lankaudaranga4-Aug-08 22:24
lankaudaranga4-Aug-08 22:24 
AnswerRe: user control Pin
Syed Shahid Hussain4-Aug-08 22:40
Syed Shahid Hussain4-Aug-08 22:40 
GeneralRe: user control Pin
nelsonpaixao5-Aug-08 13:20
nelsonpaixao5-Aug-08 13:20 
GeneralRe: user control Pin
lankaudaranga5-Aug-08 19:27
lankaudaranga5-Aug-08 19:27 
Questioninvalid path using process.start method Pin
stephan_0074-Aug-08 21:56
stephan_0074-Aug-08 21:56 
AnswerRe: invalid path using process.start method Pin
Mogaambo4-Aug-08 22:08
Mogaambo4-Aug-08 22:08 
GeneralRe: invalid path using process.start method Pin
stephan_0074-Aug-08 23:26
stephan_0074-Aug-08 23:26 
....
if (string.IsNullOrEmpty(AcrobatReaderPath))
{
  //AcrobatReaderPath = @"C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe";
  AcrobatReaderPath = @"C:\Programme\Adobe\Reader 8.0\Reader\AcroRd32.exe";
  //AcrobatReaderPath = @"C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe";
}
logger.Info("AcrobatReaderPath = " + AcrobatReaderPath);
System.Diagnostics.ProcessStartInfo startInfo = new ProcessStartInfo();
logger.Info("1");
startInfo.Arguments = "/h /t \"" + pdfFileName + "\" \"" + printerName + "\"";
logger.Info("2");
startInfo.FileName = AcrobatReaderPath;
logger.Info("3");
startInfo.UseShellExecute = true;
logger.Info("4");
startInfo.CreateNoWindow = true;
logger.Info("5");
startInfo.RedirectStandardOutput = false; // was true
logger.Info("6");
startInfo.UseShellExecute = false;
logger.Info("7");
System.Diagnostics.Process process = Process.Start(startInfo);
logger.Info("8");
....


I checked the acrobat path, it is correct. I checked the pdfFileName path, it is correct. I also checked the printername and this is correct as well.
But when starting the process it throws the error message.

What the code does: it prints a pdf file (located on harddisk) using the specified printer.
As I said in my first posting, I tried it on different systems, there are some it works fine (no error message) but there are some which cause this message. And I have no clue why.

the logging works well, so this should not be the problem!

Stephan.
GeneralRe: invalid path using process.start method Pin
Mogaambo4-Aug-08 23:46
Mogaambo4-Aug-08 23:46 
GeneralRe: invalid path using process.start method Pin
stephan_0075-Aug-08 1:12
stephan_0075-Aug-08 1:12 
GeneralRe: invalid path using process.start method Pin
stephan_0075-Aug-08 2:41
stephan_0075-Aug-08 2:41 
GeneralRe: invalid path using process.start method Pin
stephan_0075-Aug-08 11:22
stephan_0075-Aug-08 11:22 
AnswerRe: invalid path using process.start method Pin
astanton19785-Aug-08 2:50
astanton19785-Aug-08 2:50 
QuestionWhy the error message like "Object reference not set to an instance" comes.. Pin
Samiullah4-Aug-08 21:46
Samiullah4-Aug-08 21:46 
AnswerRe: Why the error message like "Object reference not set to an instance" comes.. Pin
Mogaambo4-Aug-08 22:09
Mogaambo4-Aug-08 22:09 
GeneralRe: Why the error message like "Object reference not set to an instance" comes.. Pin
Samiullah4-Aug-08 22:17
Samiullah4-Aug-08 22:17 
GeneralRe: Why the error message like "Object reference not set to an instance" comes.. Pin
Vimalsoft(Pty) Ltd4-Aug-08 22:56
professionalVimalsoft(Pty) Ltd4-Aug-08 22:56 
GeneralRe: Why the error message like "Object reference not set to an instance" comes.. Pin
Samiullah5-Aug-08 1:14
Samiullah5-Aug-08 1:14 
GeneralRe: Why the error message like "Object reference not set to an instance" comes.. Pin
AtulRane5-Aug-08 1:23
AtulRane5-Aug-08 1:23 
Questionuser interacting windows forms Pin
prasadbuddhika4-Aug-08 21:30
prasadbuddhika4-Aug-08 21:30 
AnswerRe: user interacting windows forms Pin
Syed Shahid Hussain4-Aug-08 22:49
Syed Shahid Hussain4-Aug-08 22:49 
GeneralRe: user interacting windows forms Pin
prasadbuddhika6-Aug-08 21:56
prasadbuddhika6-Aug-08 21:56 
QuestionResizing TextBox while resizing window Pin
Admin8874-Aug-08 21:16
Admin8874-Aug-08 21:16 
AnswerRe: Resizing TextBox while resizing window Pin
N a v a n e e t h4-Aug-08 21:35
N a v a n e e t h4-Aug-08 21:35 
QuestionOracle 7.3.4 Pin
kodali ranganadh4-Aug-08 21:16
kodali ranganadh4-Aug-08 21:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.