realslacker / SoftwareInstallDsc

DSC resource for installing software based on status in Add/Remove Programs
MIT License
0 stars 0 forks source link

Uninstall not working for notepad++ #2

Closed quillypowers closed 9 months ago

quillypowers commented 9 months ago

I tried using the below configuration to uninstall any instances of notepad++ using either msi or exe, but both throw the null exception seen below. SoftwareInstall Notepadpp { Ensure = "Absent" Type = "exe" Name = "Notepad++*" }

error

VERBOSE: [S150RCMCWEB1-R]: LCM: [ Start Resource ] [[SoftwareInstall]Notepadpp] VERBOSE: [S150RCMCWEB1-R]: LCM: [ Start Test ] [[SoftwareInstall]Notepadpp] VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Entering Test-TargetResource in file DSC_xSoftwareInstallResource.psm1. VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Entering Get-TargetResource in file DSC_xSoftwareInstallResource.psm1. VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Searching for products matching 'Notepad++*' with versions matching ANY VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Found matching product 'Notepad++ (64-bit x64)' 8.6.2 from publisher Notepad++ Team. You cannot call a method on a null-valued expression. At C:\projects\SqlDscGit\DevServers\RunAll\WebApp\ServerConfigs.ps1:2208 char:21

realslacker commented 9 months ago

There was a bug where a missing product ID would cause an error in the resource. I'm pushing a new version to PSGallery.

quillypowers commented 9 months ago

There was a bug where a missing product ID would cause an error in the resource. I'm pushing a new version to PSGallery.

Thanks! Pulled and testing soon.

realslacker commented 9 months ago

It always tries to pull it from the registry

quillypowers commented 9 months ago

Hm.. getting fips errs, it did work though. VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Run command line: "C:\Program Files\Notepad++\uninstall.exe" /S VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Package uninstall was completed. VERBOSE: [S150RCMCWEB1-R]: LCM: [ End Set ] [[SoftwareInstall]Notepadpp] in 1.3120 seconds. PowerShell DSC resource DSC_SoftwareInstallResource failed to execute Set-TargetResource functionality with error message: Exception calling ".ctor" with "0" argument(s): "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms."

I'll dig in further tomorrow. Thanks again.

realslacker commented 9 months ago

What version of PowerShell are you running DCS under?

Hm.. getting fips errs VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Run command line: "C:\Program Files\Notepad++\uninstall.exe" /S VERBOSE: [S150RCMCWEB1-R]: [[SoftwareInstall]Notepadpp] Package uninstall was completed. VERBOSE: [S150RCMCWEB1-R]: LCM: [ End Set ] [[SoftwareInstall]Notepadpp] in 1.3120 seconds. PowerShell DSC resource DSC_SoftwareInstallResource failed to execute Set-TargetResource functionality with error message: Exception calling ".ctor" with "0" argument(s): "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms."

I'll dig in further tomorrow. Thanks again.

— Reply to this email directly, view it on GitHubhttps://github.com/realslacker/SoftwareInstallDsc/issues/2#issuecomment-1979736516, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEG6NFV4ACQDKMHGPFQTNDYWZARRAVCNFSM6AAAAABEHYDNJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZG4ZTMNJRGY. You are receiving this because you modified the open/close state.Message ID: @.***>

quillypowers commented 9 months ago

Sorry 5.1

Major Minor Build Revision


5 1 22621 2506

realslacker commented 9 months ago

Can you share your DSC configuration block, I can try to reproduce the issue.

quillypowers commented 9 months ago

SoftwareInstall Notepadpp { Ensure = "Absent" Type = "exe" Name = "Notepad++*" }