Installing ADK 8.1 with DSC

Hello everyone!
I’m using this to install ADK 8.1

Package 'Deployment Tools'
    {
      Name = "ADK Deployment Tools"
      Path = "c:\adk81\adksetup.exe"
      ProductId = "FEA31583-30A7-0951-718C-AF75DCB003B1"
      Arguments = "/quiet /features OptionId.DeploymentTools /norestart "
      Ensure = "Present"
      ReturnCode = 0
    }
Package 'Preinstallation Environment Tools'
    {
      Name = "ADK Preinstallation Environment"
      Path = "c:\adk81\adksetup.exe"
      ProductId = "6FDE09DB-D711-593B-0823-D99D2A757227"
      Arguments = "/quiet /features OptionId.WindowsPreinstallationEnvironment /norestart "
      Ensure = "Present"
      ReturnCode = 0
    }
Package 'User State Migration Tools'
    {
      Name = "ADK Deployment Tools"
      Path = "c:\adk81\adksetup.exe"
      ProductId = "0C4384AC-02DB-B4E5-E537-EE6CF22392CF"
      Arguments = "/quiet /features OptionId.UserStateMigrationTool /norestart "
      Ensure = "Present"
      ReturnCode = 0
    }

The thing is if you use /q switch ADK ignores /norestart
http://technet.microsoft.com/en-us/library/dn621910.aspx
So the question is, how do I get over it, or how do I install all 3 features of ADK at once (I mean, how do I detect successful install with DSC in that case)?

The Package resource is a little delicate, and it depends heavily on the actual software installer not being stupid. If, in this case, the installer insists on restarting, then there’s not much you can do about it. You might try repackaging the thing, but that can get into a complex level hell and it’s beyond what we can probably help with here. Unfortunately, this is just a case where the installer wasn’t designed to be used in this way, and there might not be anything you can do about it without constructing a new installer.

Hello Don,
Is there a way to handle restarts in DSC? I mean, 1 restart is fine, 3 is overkill. I can redo the package to “/quiet /features OptionId.UserStateMigrationTool OptionId.WindowsPreinstallationEnvironment OptionId.DeploymentTools” so it will need only 1 restart.
Can I supply 2-3-xxx product keys to “test” package success?

Thanks for the prompt reply

If the package itself is restarting, no, DSC can’t override that. The Package resource is designed to accept a return code from the EXE, indicating that a restart is requested, but if the package isn’t doing that then DSC really has no clue.

And no, you can’t supply more than one product ID to the package resource. Each product ID is, by definition, a single unique package. Your installer is capable of installing multiple packages, but the stock Package resource can’t do so all in one go.

You might be better off writing a Script resource to handle the custom situation.

Thank you, its actually not that bad.
The system doesn’t reboot, just DSC says reboot pending and that’s it.
After changing package to what I wrote earlier DSC successfully applies configuration changes, just tell me to reboot the system. It’s fine for my purposes, I’m not going to automate that 101% (at least now).
Thank you.
You can mark this as solved, if this forum supports something like that.