Reputation: 31
I am working on editing the registry in windows 10 for deployment but nothing is working for me. I am writing a batch file that removes the Store icon from the taskbar. I found the key that needs changing but none of my attempts have been successful so far. Here is my latest attempt.
@echo off
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{3616E1B7-E166-433A-BBCC-03F638F02C65}User\Software\Policies\Microsoft\Windows\Explorer" /v "NoPinningStoreToTaskbar" /t REG_DWORD /d 1 /f
I have also tried to write a powershell script but that doesn't work either. Here is the powershell script.
if ((Get-ItemProperty 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{3616E1B7-E166-433A-BBCC-03F638F02C65}User\Software\Policies\Microsoft\Windows\Explorer' -name NoPinningStoreToTaskbar | select -exp NoPinningStoreToTaskbar) -ne 1) {
Set-ItemProperty 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{3616E1B7-E166-433A-BBCC-03F638F02C65}User\Software\Policies\Microsoft\Windows\Explorer' -Name NoPinningStoreToTaskbar -Value 1 }
Any insight that you can give m would be fantastic!
Upvotes: 3
Views: 1463
Reputation: 359
You're trying to set a group policy. Instead of changing the registry, you really just want to set the enable the group policy that prevents pinning the store app to the taskbar as a part of your deployment.
Upvotes: 1