Package Resource Always requires reboot?

Welcome Forums DSC (Desired State Configuration) Package Resource Always requires reboot?

This topic contains 5 replies, has 2 voices, and was last updated by

 
Keymaster
3 years, 4 months ago.

  • Author
    Posts
  • #28026

    Participant
    Points: 0
    Rank: Member

    We're utilizing the package resource like so:

    Package Prod_prog
    {
    Name = "prod prog"
    Path = "\\networkShare\..\Client\Setup.exe"
    ProductId = "6B6533BD-1680-4368-908E-D50977561A86"
    Arguments = "/qb icfagree=`"yes`""
    Credential = $Credential
    Ensure = "Present"
    }

    When applied to a node, the configuration prompts:
    A reboot is required to progress further. Please reboot the system.

    Then the configuration stops, and does not continue on to the next configuration items.

    The package being deployed does not require a restart when installed manually.
    Is there a way to specify that a reboot is not required while using the package resource? We'd prefer to avoid having to restart the node.

  • #28028

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    There's no way to specify that, no. The installer's exit code is what's indicating that a restart is needed, so apart from re-building the installer, there might not be anything you can do about it.

    You could potentially not use the Package resource, and instead built a custom Script resource, which would give you the ability to re-set the "reboot required" variable if needed.

  • #28071

    Participant
    Points: 0
    Rank: Member

    That's the approach we decided to take. For the test script I'm checking the Uninstall registry path

    HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6B6533BD-1680-4368-908E-D50977561A86}

    Is that similar to what the Package resource is doing internally for its test script?

  • #28075

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    I'd have to look at its source code (or you could), but I think it queries the Windows Installer database for the package ID.

  • #28078

    Participant
    Points: 0
    Rank: Member

    Another follow up question.

    The installation deploys a command line tool to the install path. I need to call that executable in a dependent configuration item later on in the configuration. The configuration is failing, saying that the path where the command line tool is doesn't exist (it was just created in the install). If I rerun the configuration, it finds it. Is this a known issue?

  • #28080

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    Did you code the configuration so that the dependent item has a DependsOn statement?

The topic ‘Package Resource Always requires reboot?’ is closed to new replies.