473,382 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Process.Start under WinNT4.0

Hello,

I'm opening a PDF File (e.g. "C:\test.pdf") in my windows forms vb.net
application using the following command:

System.Diagnostics.Process.Start("C:\test.pdf")

On a machine with Win2000 everything works fine.

But on a machine with WinNT4.0 the command gives an error that the file
could not be found. But the file exists, the user has the right to open it
and the Acrobat Reader is installed. I can open the File via a doubleclick.

What is wrong with the Process.Start() function under WinNT4.0, I couldn't
find anything on google or in the MSDN. The MSDN lists WinNT4.0 under the
platforms which support the function.

Can anyone help me?

thanks a lot,
volker jobst
Nov 21 '05 #1
3 1274
Try launching it as a CLI switch to the reader
System.Diagnostics.Process.Start("C:\Path to Reader\AcroRead32.Exe
C:\test.pdf")

Gary

"Volker Jobst" <bu****@gmx.de> wrote in message
news:Ox*************@TK2MSFTNGP12.phx.gbl...
Hello,

I'm opening a PDF File (e.g. "C:\test.pdf") in my windows forms vb.net
application using the following command:

System.Diagnostics.Process.Start("C:\test.pdf")

On a machine with Win2000 everything works fine.

But on a machine with WinNT4.0 the command gives an error that the file
could not be found. But the file exists, the user has the right to open it
and the Acrobat Reader is installed. I can open the File via a doubleclick.
What is wrong with the Process.Start() function under WinNT4.0, I couldn't
find anything on google or in the MSDN. The MSDN lists WinNT4.0 under the
platforms which support the function.

Can anyone help me?

thanks a lot,
volker jobst

Nov 21 '05 #2
* "Volker Jobst" <bu****@gmx.de> scripsit:
System.Diagnostics.Process.Start("C:\test.pdf")

On a machine with Win2000 everything works fine.

But on a machine with WinNT4.0 the command gives an error that the file
could not be found. But the file exists, the user has the right to open it
and the Acrobat Reader is installed. I can open the File via a doubleclick.


Try this:

\\\
Dim psi As New ProcessStartInfo()
With psi
.FileName = "C:\text.pdf"
.UseShellExecute = True
End With
Process.Start(psi)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
I found out what is wrong. My exact call looked like this:

System.Diagnostics.Process.Start("""" & strPDFFile & """")

Win2000 can handle those "" which the operating system gets by this call but
WinNT4.0 cannot handle them. I made those masking because I thought it would
be necessary due to spaces in the filename, but it works like this:

System.Diagnostics.Process.Start(strPDFFile)

even if there are spaces in the filename.

Thanks for your replies,
volker jobst
"Volker Jobst" <bu****@gmx.de> wrote in message
news:Ox*************@TK2MSFTNGP12.phx.gbl...
Hello,

I'm opening a PDF File (e.g. "C:\test.pdf") in my windows forms vb.net
application using the following command:

System.Diagnostics.Process.Start("C:\test.pdf")

On a machine with Win2000 everything works fine.

But on a machine with WinNT4.0 the command gives an error that the file
could not be found. But the file exists, the user has the right to open it
and the Acrobat Reader is installed. I can open the File via a doubleclick.
What is wrong with the Process.Start() function under WinNT4.0, I couldn't
find anything on google or in the MSDN. The MSDN lists WinNT4.0 under the
platforms which support the function.

Can anyone help me?

thanks a lot,
volker jobst

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
6
by: Dmitri Shvetsov | last post by:
Hi, Can I start an external process from the Web Service? I'm using a code, compiler keeps silence, compiles ok and starts the project. When I trace in Debugger it doesn't start an external...
4
by: Yiu | last post by:
upgent help i want to start IE explorer using C# i try many code such as below: ProcessStartInfo startInfo = new ProcessStartInfo("IEXPLORE.EXE"); Process.Start(startInfo); or Process...
10
by: Sorin Dolha [MCSD .NET] | last post by:
I would like to start a process from C# code as another user. The C# code is executed as the ASPNET user because it relies in a Web Page class, and I would like that the process will run as another...
0
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...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
0
by: Buddy Home | last post by:
There is two examples of code. Example 1. Send and Receive within the same process. Put this code in a console app called SendAndReceive and run the code. using System; using...
0
by: =?Utf-8?B?Um9i?= | last post by:
I've a requirement to monitor when certain applications are started. I'm using WMI called from VS Stusio 2005 in VB to trap Excel and Word starting. I've written the following console application...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.