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

Start a process with a parameter in the file name?

Hello everyone, here is what I want to do. I have a ATI video card
and it allows me to setup profiles for monitor configurations and so
forth. The shortcut to activate one of these profiles looks like
this:

"C:\Program Files\ATI Technologies\ATI.ACE\CLI.exe" Load
profilename="Just Monitor"

Here is one example of how I've tried to do it:

returnMonitor.StartInfo.FileName = "C:\Program Files\ATI
Technologies\ATI.ACE\CLI.exe Load profilename=''Just Monitor''"

returnMonitor.Start()

No matter which way I code it, such as changing the apostrophes I get
this error message. I've tried using the StartInfo.Verb, but I have
no idea if that is what I'm supposed to do.

************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file
specified
at
System.Diagnostics.Process.StartWithShellExecuteEx (ProcessStartInfo
startInfo)
at System.Diagnostics.Process.Start()
at StartBeyondTVwithDelay.Form1.Timer1_Tick(Object sender,
EventArgs e) in C:\Documents and Settings\Mark\My Documents\Visual
Studio Projects\StartBeyondTVwithDelay\Form1.vb:line 104
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.DebuggableCallback(IntP tr hWnd, Int32
msg, IntPtr idEvent, IntPtr dwTime)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
StartBeyondTVwithDelay
Assembly Version: 1.0.2658.15650
Win32 Version: 1.0.2658.15650
CodeBase:
file:///C:/Documents%20and%20Settings/Mark/My%20Documents/Visual%20Studio%20Projects/StartBeyondTVwithDelay/bin/StartBeyondTVwithDelay.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

Thanks in advance for your help!!!
Mark

Apr 12 '07 #1
4 1861
Mark,

StartInfo's FileName property is for the name of the exe to start.
StartInfo's Argument property is for the command line arguments.

Kerry Moorman
"mc*******@gmail.com" wrote:
Hello everyone, here is what I want to do. I have a ATI video card
and it allows me to setup profiles for monitor configurations and so
forth. The shortcut to activate one of these profiles looks like
this:

"C:\Program Files\ATI Technologies\ATI.ACE\CLI.exe" Load
profilename="Just Monitor"

Here is one example of how I've tried to do it:

returnMonitor.StartInfo.FileName = "C:\Program Files\ATI
Technologies\ATI.ACE\CLI.exe Load profilename=''Just Monitor''"

returnMonitor.Start()

No matter which way I code it, such as changing the apostrophes I get
this error message. I've tried using the StartInfo.Verb, but I have
no idea if that is what I'm supposed to do.

************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file
specified
at
System.Diagnostics.Process.StartWithShellExecuteEx (ProcessStartInfo
startInfo)
at System.Diagnostics.Process.Start()
at StartBeyondTVwithDelay.Form1.Timer1_Tick(Object sender,
EventArgs e) in C:\Documents and Settings\Mark\My Documents\Visual
Studio Projects\StartBeyondTVwithDelay\Form1.vb:line 104
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.DebuggableCallback(IntP tr hWnd, Int32
msg, IntPtr idEvent, IntPtr dwTime)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
StartBeyondTVwithDelay
Assembly Version: 1.0.2658.15650
Win32 Version: 1.0.2658.15650
CodeBase:
file:///C:/Documents%20and%20Settings/Mark/My%20Documents/Visual%20Studio%20Projects/StartBeyondTVwithDelay/bin/StartBeyondTVwithDelay.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

Thanks in advance for your help!!!
Mark

Apr 12 '07 #2
On Apr 12, 11:13 am, mcterb...@gmail.com wrote:
Hello everyone, here is what I want to do. I have a ATI video card
and it allows me to setup profiles for monitor configurations and so
forth. The shortcut to activate one of these profiles looks like
this:

"C:\Program Files\ATI Technologies\ATI.ACE\CLI.exe" Load
profilename="Just Monitor"

Here is one example of how I've tried to do it:

returnMonitor.StartInfo.FileName = "C:\Program Files\ATI
Technologies\ATI.ACE\CLI.exe Load profilename=''Just Monitor''"

returnMonitor.Start()

No matter which way I code it, such as changing the apostrophes I get
this error message. I've tried using the StartInfo.Verb, but I have
no idea if that is what I'm supposed to do.
You are using doubled up SINGLE quotes around the parameter Just
Monitor. You need to use doubled up DOUBLE quotes. As in:

returnMonitor.StartInfo.FileName = "C:\Program Files\ATI
Technologies\ATI.ACE\CLI.exe Load profilename=""Just Monitor"""

Apr 12 '07 #3
On Apr 12, 10:13 am, mcterb...@gmail.com wrote:
Hello everyone, here is what I want to do. I have a ATI video card
and it allows me to setup profiles for monitor configurations and so
forth. The shortcut to activate one of these profiles looks like
this:

"C:\Program Files\ATI Technologies\ATI.ACE\CLI.exe" Load
profilename="Just Monitor"

Here is one example of how I've tried to do it:

returnMonitor.StartInfo.FileName = "C:\Program Files\ATI
Technologies\ATI.ACE\CLI.exe Load profilename=''Just Monitor''"

returnMonitor.Start()

No matter which way I code it, such as changing the apostrophes I get
this error message. I've tried using the StartInfo.Verb, but I have
no idea if that is what I'm supposed to do.

************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file
specified
at
System.Diagnostics.Process.StartWithShellExecuteEx (ProcessStartInfo
startInfo)
at System.Diagnostics.Process.Start()
at StartBeyondTVwithDelay.Form1.Timer1_Tick(Object sender,
EventArgs e) in C:\Documents and Settings\Mark\My Documents\Visual
Studio Projects\StartBeyondTVwithDelay\Form1.vb:line 104
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.DebuggableCallback(IntP tr hWnd, Int32
msg, IntPtr idEvent, IntPtr dwTime)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
StartBeyondTVwithDelay
Assembly Version: 1.0.2658.15650
Win32 Version: 1.0.2658.15650
CodeBase:
file:///C:/Documents%20and%20Settings/Mark/My%20Documents/Visual%20Studio%20Projects/StartBeyondTVwithDelay/bin/StartBeyondTVwithDelay.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

Thanks in advance for your help!!!
Mark
Never mind. I just changed the filename to point to the shortcut on
the desktop like this:

C:\Documents and Settings\Mark\Desktop\Just Monitor.lnk

That works perfectly.

Apr 12 '07 #4
<mc*******@gmail.comschrieb:
Hello everyone, here is what I want to do. I have a ATI video card
and it allows me to setup profiles for monitor configurations and so
forth. The shortcut to activate one of these profiles looks like
this:

"C:\Program Files\ATI Technologies\ATI.ACE\CLI.exe" Load
profilename="Just Monitor"

Here is one example of how I've tried to do it:

returnMonitor.StartInfo.FileName = "C:\Program Files\ATI
Technologies\ATI.ACE\CLI.exe Load profilename=''Just Monitor''"
'Process.Start("C:\... \CLI.exe", "Load... ""JustMonitor""")'

Note the difference between "''" and """ (two single quotes vs. a double
quote). Each double quote must be encoded as two consecutive double quotes
inside the VB string literal.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Apr 13 '07 #5

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

Similar topics

6
by: James Li | last post by:
I need to run multiple .bat files(in specific order, sychronously) from my C# windows app. I also want to hide the DOS command window so that users don't see them. Basically my program lanches...
6
by: mg | last post by:
The following .exe and its parameters work correctly from the command prompt (it prints x.pdf without prompting the user. acrord32.exe /t "c:\exportfiles\x.pdf" "HP LaserJet 3300 Series PCL 6"...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
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...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
4
by: Jamey Shuemaker | last post by:
A2k2 with user-level security and all preventive measures, vis a vis, Security FAQ enabled or enacted. I've got three DBs, which due to size constraints can't, or rather, probably shouldn't be...
6
by: somequestion | last post by:
there are some dos command < or > it can use like this if there is a batch file as sample.bat sample.bat < parameter sample.bat parameter result . i just wanna use this when i use...
2
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...
5
by: sjoshi23 | last post by:
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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...
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
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
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.