473,406 Members | 2,217 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,406 software developers and data experts.

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\\system32\\mstsc.exe /v:SP3DLAB4
Any hints ?

thanks
Sunit
Sep 4 '08 #1
5 4777
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\\system32\\mstsc.exe /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...@nnowslpianmk.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\\system32\\mstsc.exe /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(cmdLine) to start a remote
desktop where cmdLine = "C:\\WINDOWS\\system32\\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...@nnowslpianmk.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\\system32\\mstsc.exe /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(cmdLine) 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(filename);

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.Start() method.
Sep 4 '08 #4
On Sep 4, 2:01*pm, za...@construction-imaging.com wrote:
On Sep 4, 2:36*pm, sjosh...@yahoo.com wrote:
On Sep 4, 12:12*pm, "Peter Duniho" <NpOeStPe...@nnowslpianmk.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\\system32\\mstsc.exe /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(cmdLine) 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(filename);

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.Start() 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(cmdLine) to start a remote
desktop where cmdLine = "C:\\WINDOWS\\system32\\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(cmdLine)" 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
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)...
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...
10
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...
15
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 &...
3
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...
3
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...
3
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...
5
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...
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
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...
0
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...
0
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...
0
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,...

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.