Command-line switches for Microsoft Office Project

You can customize the way that Microsoft Office Project 2007 starts by adding switches and parameters to the startup command. For example, you can have Project open a specific project at startup.

In this article


Learn more about commands, switches, and parameters

Each time that you start Project, you are actually running the winproj.exe command, although you do not usually type the command or even see it. You can change certain aspects of how the program starts by adding subcommands called switches to the winproj.exe command.

A switch appears as a space after the main command (winproj), followed by the name of the switch, and sometimes followed by another space and then one or more specific instructions called parameters, which give the program further information about how to run the winproj.exe command.

For example, the following command instructs Project to start and then immediately display the Project Server Accounts dialog box:

winproj -ProjectProfiles

 Note   If you are unable to access Project by typing winproj in the Run dialog box, try typing the full path to the winproj.exe file, followed by the switch that you want.

Top of Page Top of Page

Use a switch once by adding it to the Run command

  1. Make a note of the full path of the winproj.exe file on your computer. If you accepted the default folder locations when you installed Office Project 2007, the file is located at the following:

c:\Program Files\Microsoft Office\Office12\winproj.exe

  1. Do one of the following:
    • In Windows Vista    
      • Click the Start button Button image, point to All Programs, click Accessories, and then click Run.
    • In Microsoft Windows XP or Microsoft Windows Server 2003    
      • Click the Start button, and then click Run.
  2. In the Run dialog box, type a quotation mark ("), type the full path for the winproj.exe file, and then type another quotation mark (").

- OR -

Click Browse to locate and select the file. In this case, the quotation marks are supplied automatically.

  1. After the closing quotation mark, type a space, and then type the switch. For example, you might type the following:

"c:\program files\microsoft office\office12\winproj.exe" [drive:][path]filename.mpp

  1. Click OK. Office Project 2007 starts with the conditions specified in the switch.

The next time that you start Office Project 2007, the program opens normally. To make your customized startup available for repeated uses, see the next section.

 Notes 

  • Switches are not case-sensitive. For example, FILENAME.MPP functions the same as filename.mpp.
  • Remember to include one blank space before the switch and one before each parameter.

Top of Page Top of Page

Make a switch available for reuse by creating a shortcut

  1. Right-click the desktop, point to New, and then click Shortcut on the shortcut menu.
  2. In the Create Shortcut Wizard, in the Type the location of the item box, type winproj, followed by a space, and then type the switch and any parameters. For example, you might type the following:

"c:\program files\microsoft office\office12\winproj.exe" [drive:][path]filename.mpp

  1. Click Next.
  2. In the Type a name for this shortcut box, type a name for the shortcut, and then click Finish.

The wizard creates the shortcut and places it on the desktop.

  1. Whenever you want to start Project in this particular customized way, double-click the shortcut.
  2. To add the desktop shortcut to the Start menu in Windows, right-click the shortcut, and then click Pin to Start menu on the shortcut menu.

You can create a variety of shortcuts, each of which applies different switches and parameters to the program at startup.

 Notes 

  • Switches and parameters are not case-sensitive.
  • Remember to include one blank space before the switch and one before each parameter.

Top of Page Top of Page

Available switches and parameters

Switch and parameter Description
/s "URL"

Use this switch to start Project and specify the Project Server URL for enterprise projects.

For example:

/s "http://<ServerName>/projectserver"

/u "username"

Use this switch to start Project and specify a user name of someone with permission to log on to the Project Server that is specified in the /s command-line option. This can be either a Microsoft Windows NT authenticated user account or a Project Server user account.

For example:

/u "ProjectServerUserName"

/u "domain\account"

/p "password" Use this switch to start Office Project Professional 2007 and enter the password for the user who is specified in the /u command-line option. This is not required for users with a Windows NT authenticated user account.
filename Use this switch to start Office Project Professional 2007 and open a specific project.
-ProjectProfiles Use this switch to start Office Project Professional 2007 and display the Project Server Accounts dialog box.

 Note   If you don't provide the switches /u and /p, it is assumed that the currently logged-on user uses Windows NT authentication.

Top of Page Top of Page