id="info"

Microsoft

Start programs with switches in Windows 2000 Pro

If you use command-line switches in conjunction with certain programs in Windows 2000 Professional, you can add those switches to open along with the relevant applications every time you click from a shortcut. Here's how.

Many programs in Windows 2000 Professional support the use of command-line switches that modify the way the program starts or functions. Microsoft Word, for example, supports an /M switch that prevents autoexec macros from executing at program startup. Most of the console commands (XCOPY, DIR, etc.) also support several switches. It's easy to add switches to control the way an application starts.

If you're starting the application from a shortcut, just modify the shortcut to include the necessary switch or parameter.

  1. Right-click the shortcut on the desktop, in the folder, or even in the Start menu, and choose Properties.
  2. Look in the Target text, which contains the application-executable path enclosed in quotes. To the right outside the quotes, add the switches or program parameters you want to use. Make sure to add them outside the quotes or you'll get an error message.
  3. Close the Properties sheet, and then launch the application from the shortcut to test the switch.

Miss a column?

Check out the Windows 2000 Professional archive, and catch up on all the W2K Pro columns.

Want more Win2K tips and tricks? Automatically sign up for our free Windows 2000 Professional newsletter, delivered each Tuesday!

Editor's Picks