Saturday, December 03, 2011

Command Line Arguments 1

Command line arguments are the variable data those can be passed into applications as arguments when they are invoked.

When an application can have external inputs, we can pass those inputs to the applications when calling them.

Applications can be called through many methods.

  • Opening applications from windows explorer or desktop
    • For opening an application from windows explorer, we can just double click the executable file or we can press enter key after selecting it.
    • Inputs can not be passed to the application
  • Opening applications through shortcuts from windows explorer or desktop
    • We can create shortcut to application by selecting Create shortcut in the context menu of that application
    • Inputs can be changed by changing shortcuts property
  • Executing from Windows Console
    • We can execute the applications by going to specific directory and entering the application name. (More options are there which i haven’t explained here)
    • Inputs can be passed by typing them after the application name
  • Opening an associated file from windows
    • We can associate files to applications through few settings in windows registry. (Not explained here).
    • Associated file names can be passed as inputs to the application based on the registry setting
  • Programmatically invoking applications
    • We can write programs to invoke applications using methods specific to the programming language. (Process.Start in .Net)
    • Inputs can be specified explicitly in the programs.
  • Dragging a files or folders and dropping it on the application or on the application shortcuts
    • Dragged files or folder names are passed as inputs to the applications

No comments:

Post a Comment