ProcessStartInfo.Arguments Property

Gets or sets the set of command-line arguments to use when starting the application.

Namespace: System.Diagnostics
Assembly: System (in system.dll)

[TypeConverterAttribute("System.Diagnostics.Design.StringValueConverter, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] 
public string Arguments { get; set; }
/** @property */
public String get_Arguments ()

/** @property */
public void set_Arguments (String value)

public function get Arguments () : String

public function set Arguments (value : String)

Not applicable.

Property Value

File type–specific arguments that the system can associate with the application specified in the FileName property. The default is an empty string (""). The maximum string length is 2,003 characters in .NET Framework applications and 488 characters in .NET Compact Framework applications.

using System;
using System.Diagnostics;
using System.ComponentModel;

namespace MyProcessSample
	/// <summary>
	/// Shell for the sample.
	/// </summary>
	class MyProcess
		/// <summary>
		/// Opens the Internet Explorer application.
		/// </summary>
		void OpenApplication(string myFavoritesPath)
			// Start Internet Explorer. Defaults to the home page.
		    // Display the contents of the favorites folder in the browser.
		/// <summary>
		/// Opens urls and .html documents using Internet Explorer.
		/// </summary>
		void OpenWithArguments()
			// url's are not considered documents. They can only be opened
			// by passing them as arguments.
			Process.Start("IExplore.exe", "");
			// Start a Web page using a browser associated with .html and .asp files.
			Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm");
			Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp");
		/// <summary>
		/// Uses the ProcessStartInfo class to start new processes, both in a minimized 
		/// mode.
		/// </summary>
		void OpenWithStartInfo()
			ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
			startInfo.WindowStyle = ProcessWindowStyle.Minimized;
			startInfo.Arguments = "";

		static void Main()
            		// Get the path that stores favorite links.
            		string myFavoritesPath = 
            		MyProcess myProcess = new MyProcess();


Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0

Community Additions