问题
I wonder if I can automate WPI actions to setup a dev box in unattended mode, either with command line options or a configuration file. It looks like WPI takes a "URL" as a command line parameter but I have no idea what format the response should be in, and what it allows in general.
EDIT: Thanks folks for the huge effort to come up with ways to automate setups. As @fra mentioned now there is a command line tool for WPI.
回答1:
WebPi Command Line was just released:
http://blogs.iis.net/satishl/archive/2011/01/26/webpi-command-line.aspx
回答2:
"C:\Program Files\Microsoft\Web Platform Installer\WebPlatformInstaller.exe" /id "wpi://iisexpress&mvc3"
Will install both IIS Express and ASP.Net MVC
(using wpi version 3.0)
**
UPDATE:
** Take a look at this awesome sauce http://msdn.microsoft.com/en-us/library/gg433092.aspx
回答3:
One more option that was not yet mentioned is that you can also directly plug into Web PI APIs. Here are some starting points:
- Web PI APIs: Download Latest Web Stack Products for Any Platform
- Web PI APIs: Install a product from a custom feed
However in most of the cases, WebPICmdLine should do the job.
回答4:
I'm currently investigating this, thought I'd record what I've discovered so far.
webplatforminstaller.exe <configuration file> /id <wpi url>
configuration file: xml file defining the products that can be installed. See http://www.microsoft.com/web/webpi/2.0/webproductlist.xml for an example. If this parameter is not specified, the configuration file at that url will be used.
wpi url: wpi url that specifies a product to install. The format is wpi://productid/? where productid is the id of an entry in the xml file.
I'm still trying to figure out how to force the install to happen silently. I'll update if I find out how.
回答5:
The WebPICmdLine alone does not work as it will ask you to install the web platform installer 3.0 or whatever the dependecy for the product/application you will try to install.
Therefore, install the Web Platform installer first (wpilauncher.exe), then drop webpicmdline.exe to that installation folder. After that, you should be all set to use the command line tools for your installation needs.
I have yet to figure out how to do an unattend to the wpilauncher.exe itself.
来源:https://stackoverflow.com/questions/1649180/does-web-platform-installer-support-automation