Fixlet to create a new subkey and substring

Friends, Iam trying to create a fixlet to create a new subkey,substring and set value to yes in Registry to turn on Autocomplete for Internet options

I tried Powershell first in Bigfix, it shows as fixed but in Internet option Autocomplete is not enabled
Any help or advice, please

New-Item -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete” -Force
New-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete” -Name “Append Completion” -Value “yes” -PropertyType String

The problem there is that in the action, HKCU refers to the registry hive of the LocalSystem account, not your logged-on user.
You either need to loop through the logged-on user keys under HKEY_USERS, or (preferably) push this via Local Group Policy.
Search LGPO on the forum for examples

1 Like

Sure Jason, will search but I tried below one, It shows as fixed also entries are created in Registry but when i come to Internet Options-COntent-Autocomplete settings is not enabled

// Create a new string value named Append Completion and set its value data to yes in the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
delete __createfile
createfile until END_OF_FILE
{concatenation “” of (“New-Item -Path ‘HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete’ -Force`nNew-ItemProperty -Path ‘HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete’ -Name ‘Append Completion’ -Value ‘yes’ -PropertyType String”)}
END_OF_FILE

delete powershell.ps1
move __createfile powershell.ps1

waithidden powershell.exe -ExecutionPolicy Bypass -File powershell.ps1

Your user account’s HKCU is not the same as the LocalSystem user account’s registry.
There’s more than one HKCU, in fact every user who logs on gets a different view of HKCU.

https://en.wikipedia.org/wiki/Windows_Registry#HKEY_CURRENT_USER_(HKCU) or https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/windows-registry-advanced-users may explain it better than I can.

1 Like

So what i have to replace with HKCU in below fixlet
// Create a new string value named Append Completion and set its value data to yes in the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
delete __createfile
createfile until END_OF_FILE
{concatenation “” of (“New-Item -Path ‘HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete’ -Force`nNew-ItemProperty -Path ‘HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete’ -Name ‘Append Completion’ -Value ‘yes’ -PropertyType String”)}
END_OF_FILE

delete powershell.ps1
move __createfile powershell.ps1

waithidden powershell.exe -ExecutionPolicy Bypass -File powershell.ps1