473,800 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Process.Start says file not found

Hello

I'm trying to start a remote desktop session using Process.Start but
it keeps saying "File not found". The same cmd thru DOS window works
fine.

I used: C:\\WINDOWS\\sy stem32\\mstsc.e xe /v:SP3DLAB4
Any hints ?

thanks
Sunit
Sep 4 '08 #1
5 4808
On Thu, 04 Sep 2008 10:07:49 -0700, <sj******@yahoo .comwrote:
I'm trying to start a remote desktop session using Process.Start but
it keeps saying "File not found". The same cmd thru DOS window works
fine.

I used: C:\\WINDOWS\\sy stem32\\mstsc.e xe /v:SP3DLAB4

Any hints ?
Quid pro quo. You give us hints about your code first. :) So far, you
haven't described anything about how your code tries to do this, so it's
not fair to ask anyone why it's not working.

Post the code.
Sep 4 '08 #2
On Sep 4, 12:12*pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
On Thu, 04 Sep 2008 10:07:49 -0700, <sjosh...@yahoo .comwrote:
I'm trying to start a remote desktop session using Process.Start but
it keeps saying "File not found". The same cmd thru DOS window works
fine.
I used: C:\\WINDOWS\\sy stem32\\mstsc.e xe /v:SP3DLAB4
Any hints ?

Quid pro quo. *You give us hints about your code first. *:) *So far, you *
haven't described anything about how your code tries to do this, so it's *
not fair to ask anyone why it's not working.

Post the code.
Like I mentioned, I use Process.Start(c mdLine) to start a remote
desktop where cmdLine = "C:\\WINDOWS\\s ystem32\\mstsc. exe /v:SP3DLAB4
"

Sunit
Sep 4 '08 #3
On Sep 4, 2:36*pm, sjosh...@yahoo. com wrote:
On Sep 4, 12:12*pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
On Thu, 04 Sep 2008 10:07:49 -0700, <sjosh...@yahoo .comwrote:
I'm trying to start a remote desktop session using Process.Start but
it keeps saying "File not found". The same cmd thru DOS window works
fine.
I used: C:\\WINDOWS\\sy stem32\\mstsc.e xe /v:SP3DLAB4
Any hints ?
Quid pro quo. *You give us hints about your code first. *:) *So far, you *
haven't described anything about how your code tries to do this, so it's *
not fair to ask anyone why it's not working.
Post the code.

Like I mentioned, I use Process.Start(c mdLine) to start a remote
desktop where cmdLine = *"C:\\WINDOWS\\ system32\\mstsc .exe /v:SP3DLAB4
"
I may be wrong, but I think the problem is that the command you are
trying to run has a parameter on the command line. I believe if you
try to start a process with:

Process.Start(f ilename);

all filename can be is the name of a file, not the name of a file
followed by a parameter. I think you will have to instantiate a
Process object, set the StartInfo filename with the path to the RDP
program, and set the StartInfo parameters to the parameter, then do a
processobject.S tart() method.
Sep 4 '08 #4
On Sep 4, 2:01*pm, za...@construct ion-imaging.com wrote:
On Sep 4, 2:36*pm, sjosh...@yahoo. com wrote:
On Sep 4, 12:12*pm, "Peter Duniho" <NpOeStPe...@nn owslpianmk.com>
wrote:
On Thu, 04 Sep 2008 10:07:49 -0700, <sjosh...@yahoo .comwrote:
I'm trying to start a remote desktop session using Process.Start but
it keeps saying "File not found". The same cmd thru DOS window works
fine.
I used: C:\\WINDOWS\\sy stem32\\mstsc.e xe /v:SP3DLAB4
Any hints ?
Quid pro quo. *You give us hints about your code first. *:) *Sofar, you *
haven't described anything about how your code tries to do this, so it's *
not fair to ask anyone why it's not working.
Post the code.
Like I mentioned, I use Process.Start(c mdLine) to start a remote
desktop where cmdLine = *"C:\\WINDOWS\\ system32\\mstsc .exe /v:SP3DLAB4
"

I may be wrong, but I think the problem is that the command you are
trying to run has a parameter on the command line. I believe if you
try to start a process with:

Process.Start(f ilename);

all filename can be is the name of a file, not the name of a file
followed by a parameter. I think you will have to instantiate a
Process object, set the StartInfo filename with the path to the RDP
program, and set the StartInfo parameters to the parameter, then do a
processobject.S tart() method.
Thanks...just used Process.Start(" mstsc.exe", "/v:LAB5") and that did
it.

Sunit
Sep 4 '08 #5
On Thu, 04 Sep 2008 11:36:56 -0700, <sj******@yahoo .comwrote:
>Post the code.

Like I mentioned, I use Process.Start(c mdLine) to start a remote
desktop where cmdLine = "C:\\WINDOWS\\s ystem32\\mstsc. exe /v:SP3DLAB4
Looks like Zach answered the question. For the record, the above is not
"like you mentioned". You have added details such as "I use
Process.Start(c mdLine)" and "where cmdLine =". These are critical for
understanding what might be wrong with your approach, and you didn't
provide those details in your first post.

I'm happy you were able to get an answer to your question, but there's no
point in trying to rewrite history. Rather than claiming you've done
something you haven't, just provide the details that were requested.
You'll get the same benefits without the drawback of annoying people who
are just trying to help.

Pete
Sep 4 '08 #6

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

Similar topics

18
4895
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.
10
14426
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...
10
15918
by: Tony | last post by:
I am running an application called AcroComm.exe to poll time clocks here at our company. I have written a small C# app that will poll the clocks based on information found in a DB. My problem is that AcroComm will sometimes stop polling in the middle of the process and terminate. The programing manual for the app says that it sends a code to the operating system when it is done that tells what has happend like the following: 0 ...
15
1453
by: jcrouse | last post by:
Here is my code: Dim sw As StreamWriter = File.CreateText(Application.StartupPath & "\mameversion.bat") sw.WriteLine(lblMameExePath.Text & " -help >""" & Application.StartupPath & "\mameversion.txt""") sw.Close()
3
1296
by: Volker Jobst | last post by:
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
3
11757
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these suggestions. 1) Check the file permissions for the document or drive. 2) Make sure there is sufficient free memory and disk space. 3) Open the file with the Text Recovery converter." The document that I want to display is on my PC and was created by...
3
4414
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
5
3222
by: Chris | last post by:
What would be the simplest way to make an app wait for one process to finish before starting the next process? Example /// FileCopy(strPath & "test.mdb", strPath & "live.mdb") Wait(Until FileCopy is Done) <---------------That is what I'm looking for Shell(someapp.exe)
6
16919
by: itsraghz | last post by:
Dear All, I have an issue with destroy() method of java.lang.Process class. All what I am trying to do is, controlling the execution of one program through another. Let's say, Program B has to be executed conditionally through Program A based on the commands it gets from the user. Let's say, we have two inputs, "start" and "stop" to drive the Program B. I have thought of various alternatives. (1) Using Thread to control the execution...
0
10505
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
10275
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...
1
10253
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
10033
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...
1
7576
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
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
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.