473,513 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble with Process.Start

I have a relatively command that I'm attempting to get process.start to
execute.

When executing the command, I get a "The system cannot find the file
specified" error. I've gone to the trouble of making sure the entire
command is fully qualified etc. but the error still occurs.

Here is the command (modified slightly of course)
C:\Dev\[solution name]\[project name]\bin\Debug\[exe name to run].exe
/silent /type 1 /constr "Data Source=[sql express instance];Initial
Catalog=[catalog name];Persist Security Info=True;User ID=sa;pwd=[password]"
/destination C:\Dev\[solution name]\[project name]\bin\Debug\Data\[filename]
/destpwd [password]

Note that everything within [] has been modified for post.

Also note: pasting the unaltered version of this to a dos command window
works exactly as I would expect it to.
Apr 5 '07 #1
5 1024
Matt,

Splits your command in proper parts.

http://www.vb-tips.com/dbpages.aspx?...b-23cab5aa1049

Cor

"Matt F" <mf****************@nospam.nospamschreef in bericht
news:eF**************@TK2MSFTNGP05.phx.gbl...
>I have a relatively command that I'm attempting to get process.start to
execute.

When executing the command, I get a "The system cannot find the file
specified" error. I've gone to the trouble of making sure the entire
command is fully qualified etc. but the error still occurs.

Here is the command (modified slightly of course)
C:\Dev\[solution name]\[project name]\bin\Debug\[exe name to run].exe
/silent /type 1 /constr "Data Source=[sql express instance];Initial
Catalog=[catalog name];Persist Security Info=True;User
ID=sa;pwd=[password]" /destination C:\Dev\[solution name]\[project
name]\bin\Debug\Data\[filename] /destpwd [password]

Note that everything within [] has been modified for post.

Also note: pasting the unaltered version of this to a dos command window
works exactly as I would expect it to.

Apr 5 '07 #2
Hi Matt,

Yes, just as Cor pointed out, the other components after the "[exe name to
run].exe" are command line arguments, so they should not be passed as the
"filename" parameter of Process.Start(). There is a overloaded version of
Process.Start(), which takes argumeents as the second parameter:

Public Shared Function Start ( _
fileName As String, _
arguments As String _
) As Process

returnValue = Process.Start(fileName, arguments)

So, You may pass them as the second parameter of Process.Start() method.

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 5 '07 #3
Cor,

That handled exactly what I need perfectly. Thanks --- I really appreciate
it.
Apr 5 '07 #4
Jeffrey,

I already broke it out in the way that Cor mentioned... but thanks for the
tip -- I'll keep that in mind for future use.
Apr 5 '07 #5
You are welcome. If you need further help, please feel free to post, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 5 '07 #6

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

Similar topics

3
2306
by: Thomas Barth | last post by:
Hi, I dont understand the third argument of this function. This function expect the address of a function, but what does "void *(*funktion)(void *)," mean? I am confused by so many "wildcards" :-)...
8
2041
by: Mike | last post by:
Inside a HttpHandler I'm trying to spawn an EXE (console app). Although it shows up in the process list, it doesn't seem to do anything. (And even if I specify ProcessWindowStyle.Normal, it doesn't...
6
3765
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
2
1230
by: Nisha | last post by:
Hello everyone, I have a web page which needs to open files of type .pdf (adobe) and ..doc(microsoft word). I tried something fairly simple and have been having a lot of trouble getting it to...
2
1179
by: Nisha | last post by:
Hello everyone, I have a web page which needs to open files of type .pdf (adobe) and ..doc(microsoft word). I tried something fairly simple and have been having a lot of trouble getting it to...
2
1495
by: somersbar | last post by:
im trying to get a table from a microsoft access database on a simple web form using visual basic.net. ive set up the database as a file dsn. this is my connection string: DBQ=C:\Program...
5
1591
by: Matt | last post by:
Ok so I'm trying to run a simple dos command shell through a VB.NET 2005 program. The oddest thing is happening given the following piece of code: ...
2
1815
by: Matt F | last post by:
I have a relatively long command that I'm attempting to get process.start to execute. When executing the command, I get a "The system cannot find the file specified" error. I've gone to the...
7
3970
by: geoffbache | last post by:
Am currently being very confused over the following code on Windows import subprocess, os file = open("filename", "w") try: proc = subprocess.Popen("nosuchprogram", stdout=file) except...
5
13305
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
7254
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,...
0
7153
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
7432
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...
1
7094
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...
0
7519
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...
1
5079
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...
0
4743
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...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
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...

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.