WebPi is a simple but powerful tool for discovering, installing and configuring Microsoft’s Web Platform Products. It has been 2 years of great journey for the WebPi team shipping 3 versions. It has been a great partnership with the community. We have been aware of the feedback we received from the community for a way to be able to automate Webpi Tasks. So, here we are releasing WebpiCmdline, which is the short for ‘Web Platform Installer Command line’. You can run WebpiCmdline from this location or
Recommended: Copy just WebpiCmdline.exe to the directory where you have installed Web Platform Installer (Typically %program files%\Microsoft\Web Platform Installer\) and run it from here. Do not copy the rest of the dll’s. This will ensure you are always running WebpiCmdline with the latest WebPi dll’s.
It is recommended to run WebpiCmdline from a Command Prompt which is opened as Administrator. (Otherwise, WebpiCmdline will elevate itself and launch a new window which will close as soon as it is done.) To open a command prompt as “Administrator” on Windows Vista or Windows 7, type “cmd” in the start menu, Press Shift and then Right click the cmd.exe, select “Run as Administrator”. Accept UAC if necessary. Change directory at the cmd prompt to the folder where you have installed WebpiCmdline.
WebpiCmdline usage can be broadly categorized into two modes
/Products:<ProductIds> Install a Product using WebpiCmdline
Ex: >WebpiCmdline.exe /Products: MVC3, Silverlight4Toolkit
Will install MVC 3 and Silverlight4Toolkit Products
/Applications: <Appid> Install a Web Application using WebpiCmdline
Ex: > WebpiCmdline.exe /Applications:Wordpress
Will install Wordpress Web App Application
/List:<All | Available | Installed > List the products hosted on the Web Platform Feeds
/List:Feeds List the Web Platform Feeds being used
/List:Languages List the list of available languages for WebpiCmdline
Ex: >WebpiCmdline.exe /List:Available
Will list all the available products and applications for the current platform on which it was run.
Ex: > WebpiCmdline.exe /List:Feeds
Will list all the master feeds being consumed by WebpiCmdline
Let us look at the list of arguments which WebpiCmdline exposes.
Here is an msdn page explaining the most common command line arguments of WebpiCmdline
The arguments which are not covered in this article are described below
Specifies that WebpiCmdline should not Auto-Reboot the machine in the case of one of the installation requests reboot.
If not specified, WebpiCmdline will reboot the machine if one of the products installed requests for reboot. The installation will continue once the machine comes back after reboot.
Specifies that WebpiCmdline should Auto-Accept Eula’s.
If not specified, WebpiCmdline will prompt the user to accept the Eula’s before installation can begin.
Common Usage Scenarios
Let’s cover the most common User Scenarios for WebpiCmdline, and how to run them.
Installing a product hosted on Web Platform Feeds.
For these walkthroughs, let’s assume that the user is trying to install Web deploy
Find whether the Product you want to install is actually hosted on WebPi Feeds
Verify that the product MVC 3 is actually listed in the output of this command and is listed under “Available”. (if the product is listed under ‘Previously Installed Products’, you already have the product installed)
WDeploy Web Deployment Tool 2.0
Install the product using the ID listed above
Accept Eula when prompted
You are responsible for and must locate and read the license terms for each of the software above. Do you agree to the license terms for each of the third-party and/or Microsoft software listed above (Y/N)?
Automating the above Installation
Above installation is not scriptable, as it expects users to accept the EULA before installation.
In order to automate the above installation, append /AcceptEula to the above install command
WebpiCmdline.exe /Products:WDeploy /AcceptEula
Installing multiple products
In order to install multiple products, pass the product IDs as a comma separated list to the /Products: argument.
WebpiCmdline.exe /Products:WDeploy,MVC3,VWD,SQLExpress /AcceptEula
Avoid Automatic Reboot
By default, WebpiCmdline will reboot the machine if any of the products it has installed requests a reboot. When the machine comes back, WebpiCmdline will continue installing.
Sometimes this might not be the most desirable way. In order to suppress reboot, pass the /suppressreboot argument. This will make WebpiCmdline quit as soon as it is requested for a reboot by any product. Once the user reboots the machine later, WebpiCmdline will come back to life and complete installation.
WebpiCmdline.exe /Products:WDeploy,MVC3,VWD,SQLExpress /AcceptEula /SuppressReboot
Provide your own Log Name
By default, WebpiCmdline logs to a text file in the working directory, named as “Current date time”.txt. Example : 1.25.2011 1.44.08 PM.txt
If you wish to rename this file, pass the /log: argument
WebpiCmdline.exe /Products:WDeploy /AcceptEula /Log:wdeployinstalllog.txt
Provide database Admin Passwords during installation
When WebpiCmdline installs SQL or MySQL database, it prompts the users to enter the root/admin/sa password to be used for the database. To Automate this use case , use the /Sqlpassword & /Mysqlpassword arguments
WebpiCmdline.exe /Products:SQLExpress /AcceptEula /SQLPassword:MySecretPassword
Install a product from a different language
Some products, for example VWD, are available in multiple languages. By default, if no language is provided, WebpiCmdline will always install the English version of the Product. To specify your desired language, use the /Language Argument
WebpiCmdline.exe /Products:VWD /AcceptEula /Language:FR
To get the list of languages, use the /list:Language argument explained above.
Install a product from a different Master feed
By default, WebpiCmdline fetches master feeds from the Microsoft.com/Gallery website. To view this info, use the /List:Feeds option explained above.
To force WebpiCmdline to fetch master feeds from a different location, use the /XML Argument
WebpiCmdline.exe /Products:MyProduct /XML:http://mywebsite.com/myfeed.xml
Install a product from a different Custom feed
By default, WebpiCmdline does not load any custom feeds. It only works with the Master feeds. By providing a custom feed, you can add another feed to the existing list of Master feeds. Refer this blog post for more info on this : http://blogs.iis.net/kateroh/archive/2010/02/11/webpi-apis-install-a-product-from-a-custom-feed.aspx
WebpiCmdline.exe /Products:MyProduct /feeds:http://mywebsite.com/mycustomfeed.xml
Install a Web Application
WebpiCmdline can install Web Applications too. Web Applications are always installed to a Webserver. The Web Server can be either IIS or IISExpress. By default, WebpiCmdline always installs Web Applications to IIS.
To install to IISExpress, use the /IISExpress Argument
WebpiCmdline.exe /Applications:Wordpress /IISExpress
After accepting EULA, WebpiCmdline will prompt the user to enter the Application Parameters which will be used to configure the Application Installation. This is the manual mode of installing Web Applications.
Please Enter Web Application Parameters for \"WordPress\"
Application Path(Press Enter to use:Default Web Site/wordpress):<press Enter>
Database Server(Press Enter to use:localhost): <press Enter>
Database Name(Press Enter to use:wordpress): <press Enter>
Database User Name(Press Enter to use:wordpressuser): <press Enter>
Database Password: mysecretpassword
Database Administrator(Press Enter to use:root): <press Enter>
Database Administrator Password: mysecretrootpassword
Unique Key for Passwords(Press Enter to use:put your unique phrase here): <press Enter>
Unique Key for Secure Passwords(Press Enter to use:put your unique phrase here): <press Enter>
Unique Key for Authentication(Press Enter to use:put your unique phrase here): <press Enter>
Second Unique Key for Authentication(Press Enter to use:put your unique phrase here): <press Enter>
Parameters written to WordPress0.app
To use the default value for the parameter, just press enter. Or enter the value manually.
Some parameters don’t have default value, and the user is expected to enter the value manually.
Automating Web Application Installs
As you might have noticed above, Web Application installs are not very silent. They prompt for user inputs to configure the web application.
To automate web application installs, the user is expected to provide a ‘.app’ file along with the appid.
The .app file is generated when you run an app install in Manual Mode (See the last line of the above example :
Parameters written to WordPress0.app
This ‘.app’ file is the application parameter-value file which is used to configure the application parameters. Contents of WordpressParams.app file :
AppPath[@]Default Web Site/wordpress
Key1[@]put your unique phrase here
Key2[@]put your unique phrase here
Key3[@]put your unique phrase here
Key4[@]put your unique phrase here
To re-use this file, run
This will run Wordpress installation in silent mode, i.e., the user is not prompted for Parameter values.
You can tweak the app file values by opening the .app file in notepad and editing it before re-using.
When installing a Web Application which supports 2 databases, WebpiCmdline always defaults to the first database listed in the application manifest. WebPi UI however, does provide support where the user can chose between the databases.
WebpiCmdline and Windows Azure
Webpicmdline is also built as ‘Any Cpu’ binary for startup steps of Windows Azure. You can download webpicmdline_anycpu.zip from :
Why 2 builds? Webpicmdline works with iisexpress to install Web Applications to IISExpress. However IISExpress is a 32 bit process, and so WebpiCmdLine is built as 32 bit (x86) binary.