HKCU Registry Settings For All Users doing nothing, no errors, logs look good

Chasing my tail with this setting. By all accounts it’s working with no error but the value isn’t being written. Code looks like:

		[scriptblock]$HKCURegistrySettings = {
		Set-RegistryKey -Key 'HKEY_CURRENT_USER\Software\Roxio\Roxio Burn' -Name 'SupportVerify' -Type DWord -Value '1'
												}
		Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings

Log looks like:

[Post-Installation] :: Get the User Profile Path, User Account SID, and the User Account Name for all users that log onto the machine.	Get-UserProfiles	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Convert the SID [S-1-5-18] to an NT Account name.	ConvertTo-NTAccountOrSID	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Convert the SID [S-1-5-19] to an NT Account name.	ConvertTo-NTAccountOrSID	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Convert the SID [S-1-5-20] to an NT Account name.	ConvertTo-NTAccountOrSID	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Convert the SID [S-1-5-21-1844509373-2084460163-2072516641-88131] to an NT Account name.	ConvertTo-NTAccountOrSID	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Convert the SID [S-1-5-21-1844509373-2084460163-2072516641-93738] to an NT Account name.	ConvertTo-NTAccountOrSID	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Convert the SID [S-1-5-21-3852303618-3022820046-2037426319-1002] to an NT Account name.	ConvertTo-NTAccountOrSID	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Convert the SID [S-1-5-21-3852303618-3022820046-2037426319-500] to an NT Account name.	ConvertTo-NTAccountOrSID	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Load the User [domaingoeshere\usergoeshere] registry hive in path [HKEY_USERS\S-1-5-21-1844509373-2084460163-2072516641-88131].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Execute ScriptBlock to modify HKCU registry settings for all users.	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Create registry key [Registry::HKEY_CURRENT_USER\Software\Roxio\Roxio Burn].	Set-RegistryKey	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Set registry key value: [Registry::HKEY_CURRENT_USER\Software\Roxio\Roxio Burn] [SupportVerify = 1].	Set-RegistryKey	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Unload the User [domaingoeshere\usergoeshere] registry hive in path [HKEY_USERS\S-1-5-21-1844509373-2084460163-2072516641-88131].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: The User [domaingoeshere\usergoeshere] registry hive is already loaded in path [HKEY_USERS\S-1-5-21-1844509373-2084460163-2072516641-93738].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Execute ScriptBlock to modify HKCU registry settings for all users.	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Update registry key value: [Registry::HKEY_CURRENT_USER\Software\Roxio\Roxio Burn] [SupportVerify = 1].	Set-RegistryKey	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Load the User [machinegoeshere\defaultuser0] registry hive in path [HKEY_USERS\S-1-5-21-3852303618-3022820046-2037426319-1002].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Execute ScriptBlock to modify HKCU registry settings for all users.	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Update registry key value: [Registry::HKEY_CURRENT_USER\Software\Roxio\Roxio Burn] [SupportVerify = 1].	Set-RegistryKey	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Unload the User [machinegoeshere\defaultuser0] registry hive in path [HKEY_USERS\S-1-5-21-3852303618-3022820046-2037426319-1002].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Load the User [machinegoeshere\anotheruserhere] registry hive in path [HKEY_USERS\S-1-5-21-3852303618-3022820046-2037426319-500].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Execute ScriptBlock to modify HKCU registry settings for all users.	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Update registry key value: [Registry::HKEY_CURRENT_USER\Software\Roxio\Roxio Burn] [SupportVerify = 1].	Set-RegistryKey	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Unload the User [machinegoeshere\anotheruserhere] registry hive in path [HKEY_USERS\S-1-5-21-3852303618-3022820046-2037426319-500].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Load the User [Default User] registry hive in path [HKEY_USERS\S-1-5-21-Default-User].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Execute ScriptBlock to modify HKCU registry settings for all users.	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:17 AM	8920 (0x22D8)
[Post-Installation] :: Update registry key value: [Registry::HKEY_CURRENT_USER\Software\Roxio\Roxio Burn] [SupportVerify = 1].	Set-RegistryKey	1/31/2022 8:06:18 AM	8920 (0x22D8)
[Post-Installation] :: Unload the User [Default User] registry hive in path [HKEY_USERS\S-1-5-21-Default-User].	Invoke-HKCURegistrySettingsForAllUsers	1/31/2022 8:06:18 AM	8920 (0x22D8)
[Post-Installation] :: Bypassing Show-InstallationPrompt [Mode: silent]. Message:Successfully installed Roxio Secure Burn 2 - Enable Basic Verification 1.0.	Show-InstallationPrompt	1/31/2022 8:06:18 AM	8920 (0x22D8)
[Post-Installation] :: Bypassing Close-InstallationProgress [Mode: silent]	Close-InstallationProgress	1/31/2022 8:06:18 AM	8920 (0x22D8)
[Post-Installation] ::  RoxioSecureBurn2-EnableBasicVerification_1.0_EN_01 Installation completed with exit code [0].	Exit-Script	1/31/2022 8:06:18 AM	8920 (0x22D8)

But nothing is happening in registry for any user. Install is an ugly old exe with quiet parameters that otherwise works fine.

Any input?

OMG. Just use ActiveSetup. PSADT even has a function to set the registry for you.

Your solution will only work with EXISTING users.

Ok. I only need it for existing users, which is why I was going this way, but I’ll do that instead. Thanks!

Edit: Turns out I needed -SID $UserProfile.SID although the help says it’s not required.

1 Like