WPI: GetWPIProductById
This commit is contained in:
parent
b62b699461
commit
7ceccd4c10
7 changed files with 437 additions and 238 deletions
|
@ -266,6 +266,20 @@ namespace WebsitePanel.Server.Code
|
|||
|
||||
return products;
|
||||
}
|
||||
|
||||
public Product GetWPIProductById(string productId)
|
||||
{
|
||||
foreach (Product product in _productManager.Products)
|
||||
{
|
||||
if (0 == String.Compare(product.ProductId, productId, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return product;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return null; //not found
|
||||
}
|
||||
|
||||
public List<Product> GetProductsToInstall(IEnumerable<string> productIdsToInstall)
|
||||
{
|
||||
|
@ -582,7 +596,6 @@ namespace WebsitePanel.Server.Code
|
|||
private void Initialize()
|
||||
{
|
||||
// create cache folder if not exists
|
||||
//_webPIinstallersFolder = Environment.ExpandEnvironmentVariables(@"%LocalAppData%\Microsoft\Web Platform Installer\installers");
|
||||
_webPIinstallersFolder = Path.Combine(
|
||||
Environment.ExpandEnvironmentVariables("%SystemRoot%"),
|
||||
"Temp\\zoo.wpi\\AppData\\Local\\Microsoft\\Web Platform Installer\\installers");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue