I've come across the following situation a number of times and was wondering if there was any interest in getting this in as an optional flag. A boolean "Update" option on the resource that defaults to $False that will only update the key if it exists and not create it if its absent.
Example Situation:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MICROSOFT VISUAL STUDIO 2010 TOOLS FOR OFFICE RUNTIME (X64)" has the property "UninstallString" that is unquoted which for us is an audit finding. There is currently no way to tell the registry resource to set this to the desired value if the key exists without creating on systems with the run time absent.
Proposal:
Optional parameter that tells the registry resource to only update the key if it exists. Meaning desired state is an absent key or an existing key matching the provided value.
I've come across the following situation a number of times and was wondering if there was any interest in getting this in as an optional flag. A boolean "Update" option on the resource that defaults to $False that will only update the key if it exists and not create it if its absent.
Example Situation: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MICROSOFT VISUAL STUDIO 2010 TOOLS FOR OFFICE RUNTIME (X64)" has the property "UninstallString" that is unquoted which for us is an audit finding. There is currently no way to tell the registry resource to set this to the desired value if the key exists without creating on systems with the run time absent.
Proposal: Optional parameter that tells the registry resource to only update the key if it exists. Meaning desired state is an absent key or an existing key matching the provided value.
if this would be accepted I would be happy to work on the PR