简体   繁体   English

Web Platform Installer是否支持自动化?

[英]Does Web Platform Installer support automation?

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. 我想知道是否可以使用命令行选项或配置文件自动执行WPI操作以在无人参与模式下设置开发框。 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. 看起来WPI将“URL”作为命令行参数,但我不知道响应应该采用什么格式,以及它通常允许的内容。

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 . 正如@fra现在提到的,WPI有一个命令行工具

"C:\\Program Files\\Microsoft\\Web Platform Installer\\WebPlatformInstaller.exe" /id "wpi://iisexpress&mvc3" “C:\\ Program Files \\ Microsoft \\ Web Platform Installer \\ WebPlatformInstaller.exe”/ id“wpi:// iisexpress&mvc3”

Will install both IIS Express and ASP.Net MVC 将安装IIS Express和ASP.Net MVC

(using wpi version 3.0) (使用wpi 3.0版)

** **

UPDATE: 更新:

** Take a look at this awesome sauce http://msdn.microsoft.com/en-us/library/gg433092.aspx **看看这个很棒的酱汁http://msdn.microsoft.com/en-us/library/gg433092.aspx

One more option that was not yet mentioned is that you can also directly plug into Web PI APIs. 还有一个尚未提及的选项是您还可以直接插入Web PI API。 Here are some starting points: 以下是一些起点:

However in most of the cases, WebPICmdLine should do the job. 但是在大多数情况下,WebPICmdLine应该完成这项工作。

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. 配置文件:定义可安装产品的xml文件。 See http://www.microsoft.com/web/webpi/2.0/webproductlist.xml for an example. 有关示例,请参阅http://www.microsoft.com/web/webpi/2.0/webproductlist.xml If this parameter is not specified, the configuration file at that url will be used. 如果未指定此参数,则将使用该URL处的配置文件。

wpi url: wpi url that specifies a product to install. wpi url:指定要安装的产品的wpi url。 The format is wpi://productid/? 格式为wpi:// productid /? where productid is the id of an entry in the xml file. 其中productid是xml文件中条目的id。

I'm still trying to figure out how to force the install to happen silently. 我仍在试图弄清楚如何强制安装以静默方式发生。 I'll update if I find out how. 如果我发现如何,我会更新。

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. 单独的WebPICmdLine不起作用,因为它会要求您安装Web平台安装程序3.0或您尝试安装的产品/应用程序的任何依赖性。
Therefore, install the Web Platform installer first (wpilauncher.exe), then drop webpicmdline.exe to that installation folder. 因此,首先安装Web平台安装程序(wpilauncher.exe),然后将webpicmdline.exe拖放到该安装文件夹。 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. 我还没弄明白如何无人值守wpilauncher.exe本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM