Is there a source of real examples for xPackage? I think some of these configurations are complicated enough that a repository (similar to Chocolatey) would be a good idea.
For instance, I am trying to figure out the right parameters for installing .NET Framework 4.5.2. Here is what I have so far:
What should Name be? Does this have to match something in the registry somewhere?
Same for ProductId
How do I detect the 3020 return code and indicate that a reboot is needed (maybe DSC picks that up from somewhere else).
In general, I think the .NET 4.5.2 package is a tricky one because it behaves differently depending on which OS you install it. In Win 8.1/Server2012R2 it is installed as a Windows update (KB2934520). But in earlier servers (like 2008R2), it installed into the Programs and Features list and probably has a ProductId there.
Anyway, this stuff is sparsely documented and some real world examples of specific products would be helpful.
Name is arbitrary, in most of the cases I’ve seen. ProductID is the ProductID from the Windows Installer database. And, the package resource ought to be picking up on the reboot requirement itself and setting the appropriate DSC flag.
The Package resource is particular is extremely hit or miss, in my experience. In most cases, I’ve had to write a custom Script resource to deal with these things. I’m hoping that with OneGet, packages will become a bit more standardized and easier to manage this way.
Rob,
Did you ever get this to work for you? I’m trying to write a custom script resource to install .net 4.5.2 and can’t get DSC to invoke the installer. Hoping you have an easier answer there.
Thanks,
Mike
Here is an example of my SetScript, the commands work if I execute them in a powershell window, but the installer never gets executed when run by DSC: