How to programmatically create a project server account (or profile) for Microsoft Office Project Professional (2003 or 2007)

If you don't want to manually create your project server account for Microsoft Office Project Professional (2003 or 2007) , you can use the following VBscript code.

You need to run this script in the context of the user:

Option Explicit

Dim ProjObj

Set ProjObj = CreateObject("msproject.application")

if ProjObj.Profiles.Count = 1 Then

  ProjObj.Profiles.add "Production EPM", "https://www.contoso.com/projectserver"

  ProjObj.Profiles.DefaultProfile = ProjObj.Profiles.item(2)

End IF

ProjObj.Quit

Set ProjObj=Nothing