473,808 Members | 2,885 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS2008 VB.NET - Problem with System.Diagnost ics.Process.Sta rt

KodeKrazy
32 New Member
I can use System.Diagnost ics.Process.Sta rt to launch .txt, .bmp, .jpg, etc., but if I try to launch an .exe, from the same folder, I get the "The system cannot find the file specified." error.

For example:
This works: System.Diagnost ics.Process.Sta rt("C:\swr\test .txt")

This does NOT: System.Diagnost ics.Process.Sta rt("C:\swr\engi ne.exe")

Any help is greatly appreciated!

KK
Oct 23 '08 #1
3 5974
debasisdas
8,127 Recognized Expert Expert
Try to use SHELL function .
Oct 23 '08 #2
joedeene
583 Contributor
I can use System.Diagnost ics.Process.Sta rt to launch .txt, .bmp, .jpg, etc., but if I try to launch an .exe, from the same folder, I get the "The system cannot find the file specified." error.

For example:
This works: System.Diagnost ics.Process.Sta rt("C:\swr\test .txt")

This does NOT: System.Diagnost ics.Process.Sta rt("C:\swr\engi ne.exe")

Any help is greatly appreciated!

KK
Is that the exact file name, directory, and extension of the file? Because basically it looks like it doesn't find it, but if it's having a problem just with the .exe then use the ProcessStartInf o Class and set the .UseShellExecut e property to true.

joedeene
Oct 24 '08 #3
KodeKrazy
32 New Member
RESOLVED! Many Thanks!
Oct 29 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
5044
by: Tommy Lu | last post by:
Hi, wondering if there is a way to interact the shell command with the C# program? For example, if I type c:\>ver it then suppose to return the version of the OS I am currently using... or c:\>systeminfo
7
2970
by: ~toki | last post by:
I have a full work app (server and client) that talk between two executables trought Console.WriteLine(); & Console.ReadLine(); I have the source code of the server. I need to make the client. To do this i have Console.WriteLine("Hi server"); while (true)
3
6903
by: vbMark | last post by:
Here is my C# code in the ASP.NET page. public static void DoConvert ( string sFile ) { string cmd = "foo.exe" ; string param = " /bar.txt" ; Process myproc ; // <-- Error here ProcessStartInfo startInfo = new ProcessStartInfo ( cmd , param ) ; startInfo.CreateNoWindow = true ; startInfo.WindowStyle = ProcessWindowStyle.Hidden ;
1
7228
by: Primo | last post by:
Hello, I am building a data management application with the following processes: Process 1 is a Windows service which uses FileSystemWatcher to monitor a directory. Process 2 opens a file copied into the directory and inserts the data into a data warehouse. Process 3 queries the data warehouse and transfers the results to a data mart.
1
5999
by: solex | last post by:
Hello All, Hopefully someone has run into this error. I have written a class(source below) that launches a thread to monitor the StandardOutput of a System.Diagnostics.Process, in particular I am executing the find.exe program. The application works perfectly in the development environment. As soon as I execute the compiled program and start the find process I get an "Application Error". The error states that the instruction...
6
1902
by: hzgt9b | last post by:
Using VS 2003, .NET: I developed a windows application that performs several actions based on an input file. The application displays a progress bar as each action executes. Based on new requirements, this application needs to be able to shell off other processes and wait while in the mean time displaying a progress bar of the process's. I am using the System.Disgnostics.Process class to "start" and "waitForExit" of these processes... I...
0
849
by: Daniel | last post by:
C# windows service freezes on System.Diagnostics.Process.Start(info) When I launch PSCP from a C# windows service and launch pscp 0.53 there are no issues. but when I use C# windows service to launch pscp 0.58 C# freezes in System.Diagnostics.Process.Start(info)? pscp 0.58 works fine at command line, but causes C# to freeze on ystem.Diagnostics.Process.Start(info) also i noticed that the pscp process does not show in taske manager while...
2
9832
by: Bala Nagarajan | last post by:
Hello, I am having issues when i use the Systsem.Diagnostics.Process namespace to start a process. The problem is that i am able to succeed in starting a process (an exe) only few times in a row from a windows application before it fails throwing the following exception. (The exe i am trying to run is in the same directory as the application.) System.ComponentModel.Win32Exception The system cannot find the file specified...
7
11683
by: Abhi | last post by:
Hi, I want to open a File with unknown Extension using C#. What i want is i do System.Diagnostics.Process.Start("FileName"); Now if File is associated with any program then the File with open with that Application, this is working fine. My requirement says, if file extension is unknown or not associated with any application then, it should open the Default windows Program association box and allow user to select a program to open that...
0
9721
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
9600
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10631
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...
0
10374
jinu1996
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10114
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
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
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.