473,813 Members | 3,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Process.Start under WinNT4.0

Hello,

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

System.Diagnost ics.Process.Sta rt("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 1296
Try launching it as a CLI switch to the reader
System.Diagnost ics.Process.Sta rt("C:\Path to Reader\AcroRead 32.Exe
C:\test.pdf")

Gary

"Volker Jobst" <bu****@gmx.d e> wrote in message
news:Ox******** *****@TK2MSFTNG P12.phx.gbl...
Hello,

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

System.Diagnost ics.Process.Sta rt("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.d e> scripsit:
System.Diagnost ics.Process.Sta rt("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 ProcessStartInf o()
With psi
.FileName = "C:\text.pd f"
.UseShellExecut e = True
End With
Process.Start(p si)
///

--
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.Diagnost ics.Process.Sta rt("""" & 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.Diagnost ics.Process.Sta rt(strPDFFile)

even if there are spaces in the filename.

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

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

System.Diagnost ics.Process.Sta rt("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
2956
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 starting is that it has a welcome window first which gets displayed and then the real windows after a while,in other words it means that the process name is the same, but the handle I need to retrive is the one from the final window and not the...
18
4897
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) p.stdin.write("hostname\n") however, it doesn't seem to work. I think the cmd.exe is catching it.
6
6852
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 process. That's strange for me. I understand that it should be a new shell, but why I can't start it? Is it need to have a Windows application to start an external process? I created a very long batch files and a complicated script to work with...
4
14210
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 process = new Process(); process.StartInfo.FileName = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE";
10
14428
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 user to gain the required rights for execution (the external process needs to create a mailbox in Exchange, so it needs to be run as an Exchange Full Administrator-powered user). For the moment, I have tries using the Start() static method of the...
0
2265
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 example a password-protected word-document). So I've tried the following:
3
4318
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 receiver is running within Process1. If I move the receiver into Process2 then its fast. Please can someone explain.
0
3170
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 System.Collections.Generic; using System.Net; using System.Net.Sockets; using System.Runtime.Serialization.Formatters.Binary;
0
1737
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 which wires up 4 events to trap Excel/Word Start/Stop events. The application works fine for Excel but Word behaves strangely. When I start an instance of Word I get the correct message displayed in the console. When I start a second instance of...
0
9734
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10424
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10140
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9224
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7684
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5706
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3885
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3030
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.