DSC getting stuck while installing .exe file

Welcome Forums DSC (Desired State Configuration) DSC getting stuck while installing .exe file

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

 
Participant
5 months, 3 weeks ago.

  • Author
    Posts
  • #80870

    Participant
    Points: 0
    Rank: Member

    Hi Guys,

    I'm executing below script on my machine it is getting stuck with the below error can anyone help me out with this correct me with the steps to install .exe file.

    SCRIPT
    Configuration NotePadPlus

    {
    Node localhost
    {
    Package NotePadPlus{
    Ensure = 'Present'
    Path = 'C:\DSC\Softwares\npp.7.5.1.Installer.x64.exe'
    Name = 'Notepad++'
    ProductID = "
    Arguments = '\q'
    LogPath = 'C:\dsc\notepadplus_dsc.log'
    }
    }
    }

    NotePadPlus -OutputPath C:\dsc\ -Verbose
    Start-DscConfiguration -Path c:\dsc\ -Wait -Verbose -Force

    ERROR

    VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, "methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root
    /Microsoft/Windows/DesiredStateConfiguration'.
    VERBOSE: An LCM method call arrived from computer MAD with user sid S-1-5-21-2686951965-2129314255-1211374589-500.
    VERBOSE: The -Force option was specified with the Stop operation. The current configuration has been successfully cancelled.

    The console is stuck in the running state form long time...

    Thank you in advance.

  • #80885

    Participant
    Points: 1
    Rank: Member

    I'm not sure if this will help, but we install the 32-bit version of Notepad++ using DSC with "/S" as the argument.

  • #80900

    Participant
    Points: 0
    Rank: Member

    Thank's a lot for your reply, Eric.
    However, it didn't resolve the issue.

    Can anyone help me with this, I'm unable to install any of the .exe files...

    Thank you in advance

  • #80929

    Participant
    Points: 22
    Rank: Member

    I'm not sure if Package resource will be able to install a NON-MSI package since ProductId is required: https://docs.microsoft.com/en-us/powershell/dsc/packageresource

    Also, your ProductId is an empty string, have you tried using the registry key name of HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\Uninstall for this product?

  • #101479

    Participant
    Points: 0
    Rank: Member

    I had the same issue. It was due to the file being downloaded from the internet. I suppose DSC was getting stuck on the file security warning. To resolve, I unblocked the file from file properties.

  • #103120

    Participant
    Points: 0
    Rank: Member

    I distribute all my apps, dsc modules, posh modules with the chocolatey dsc module. This gives you version pining if needed and completly cleanes the dsc configs from any of your dsc configurations.

    You can also build your own scripts to Auto update all Packages in your chocolatey repository and you will Not waste a Minute (almost) on searching, packaging, Distribution new software anymore.

    It will also assist you a lot, if you ever decide to move to docker for windows.

The topic ‘DSC getting stuck while installing .exe file’ is closed to new replies.