Table of Contents

Name

cygstart - start a program or open a file or URL

Synopsis

cygstart [-oxefp?] [-a action] [-d directory] [--hide] [--maximize] [--minimize] [--restore] [--show] [--showmaximized] [--showminimized] [--showminnoactive] [--showna] [--shownoactivate] [--shownormal] [--usage] [--version] [--license] [--reference] file [arguments]

Description

cygstart is a command-line tool which allows you to let Windows start a program or open a file or URL in its associated application. It is similar to the Windows command-line start command.

Options

Action options

-a, --action=STRING
Use specified action instead of default

-o, --open
Short for: --action open

-x, --explore
Short for: --action explore

-e, --edit
Short for:

-

-

action edit

-f, --find
Short for: --action find

-p, --print
Short for: --action

print

Directory options

-d, --directory=STRING
Set working directory

Show options

--hide
Hides the window and activates another window

--maximize
Maximizes

the specified window

--minimize
Minimizes the specified window and activates

the next top-level window in the z-order

--restore
Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag

when restoring a minimized window

--show
Activates the window and displays

it in its current size and position

--showmaximized
Activates the window

and displays it as a maximized window

--showminimized
Activates the window

and displays it as a minimized window

--showminnoactive
Displays the window as a minimized window. The active window remains active

--showna
Displays the window in its current state. The active window remains active

--shownoactivate
Displays a window in its most recent size and position. The active window

remains active

--shownormal
Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window

for the first time

Help options

-?, --help
Show this help message

--usage

Display brief usage message

--version
Display version information

--license

Display licensing information

--reference
Open MSDN reference for ShellExecute

Examples

Start Bash in a new window


$ cygstart bash

Open the Cygwin website in your default browser:


$ cygstart http://www.cygwin.com

Print a text file


$ cygstart --print README.txt

Open a Word document in a maximized window


$ cygstart --maximize ~/projects/whatever/design.doc

Copyright

Copyright (C) 2002 Michael Schaap

cygstart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

cygstart is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

Author

Michael Schaap <cygstart(at)mscha.org>

See Also

<http://msdn.microsoft.com/library/en-us/shellcc/platform/Shell/reference/functions/shellexecute.asp >


Table of Contents