ben
ben

Reputation: 1501

How to ensure exact version of Installshield setup.exe is installed by Powershell DSC

I'm trying out Powershell DSC as a way of automating deployments. We have an EXE installer created by Installshield for a server application, and need to ensure the latest version is installed.

Installshield guidelines (http://www.flexerasoftware.com/producer/resources/white-papers/is-msipatches.html) suggest that the Package Code should change for every build, the Product Code should stay the same between minor versions, and the Upgrade Code should always stays the same.

Is there a way of telling Powershell DSC to install a particular minor version, i.e. to make sure that the Package Code matches exactly?

I'm using the following to create the MOF, but when I run it, it detects the Product as already installed and doesn't do anything, even though it's a different Package.

Package MyApp
{
    Ensure = "Present"
    Name = "MyApp"
    Path = "\\path\to\specific\version\of\setup.exe"
    ProductId = ''
    Arguments = "/V`"ADDLOCAL=ALL /qb`""
}

Upvotes: 0

Views: 167

Answers (1)

Nana Lakshmanan
Nana Lakshmanan

Reputation: 739

The package resource will declare the resource as correctly configured if the package is already installed. So it will not work for your specific scenario. You will have to write a custom package resource or extend the existing one. If you want to modify feel free to fork this repository and extend the functionality https://github.com/PowerShell/xPSDesiredStateConfiguration You can also open an issue for someone to pick up and fix the same.

Upvotes: 1

Related Questions