This documentation is archived and is not being maintained.

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 Property Arguments As String
Dim instance As ProcessStartInfo
Dim value As String

value = instance.Arguments

instance.Arguments = value
/** @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.

Imports System
Imports System.Diagnostics
Imports System.ComponentModel

Namespace MyProcessSample
   '/ <summary>
   '/ Shell for the sample.
   '/ </summary>
   Class MyProcess 
      '/ <summary>
      '/ Opens the Internet Explorer application.
      '/ </summary>
      Public Sub OpenApplication(myFavoritesPath As String)
         ' Start Internet Explorer. Defaults to the home page.
         ' Display the contents of the favorites folder in the browser.
      End Sub 'OpenApplication
      '/ <summary>
      '/ Opens urls and .html documents using Internet Explorer.
      '/ </summary>
      Sub 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")
      End Sub 'OpenWithArguments
      '/ <summary>
      '/ Uses the ProcessStartInfo class to start new processes, both in a minimized 
      '/ mode.
      '/ </summary>
      Sub OpenWithStartInfo()
         Dim startInfo As New ProcessStartInfo("IExplore.exe")
         startInfo.WindowStyle = ProcessWindowStyle.Minimized
         startInfo.Arguments = ""
      End Sub 'OpenWithStartInfo
      Shared Sub Main()
         ' Get the path that stores favorite links.
         Dim myFavoritesPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
         Dim myProcess As New MyProcess()
      End Sub 'Main 
   End Class 'MyProcess
End Namespace 'MyProcessSample

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