This post concentrates it’s focus on an issue that comes when either you have a computer that’s running Windows 10 RTM (Build 10240) or you have upgraded your computer to Windows 10 version 1511 (Build 10586). In both of these scenarios, you might receive an error “Namespace ‘Microsoft.Policies.Sensors.WindowsLocationProvider’ is already defined as the target namespace for another file in the store. when you try to run gpedit.msc & try to click on either User or computer configuration. You might not get this issue if you are upgrading from Windows 7, Windows 8.1 directly to Windows 10 version 1511 & skipping Windows 10 RTM. I recently faced this issue when visiting a Microsoft conference at Hyderabad and thought to post a solution to it.
The screenshot of the example looks like this:
The error reads:
Namespace ‘Microsoft.Policies.Sensors.WindowsLocationProvider’ is already defined as the target namespace for another file in the store.
C:\WINDOWS\PolicyDefinitions\Microsoft-Windows-Geolocation-WLPAdm.admx, line 5, column 110
This usually happens when the the files “Microsoft-Windows-Geolocation-WLPadm.admx” & “LocationProviderADM.admx” present in C:\Windows\PolicyDefinitions\ and “Microsoft-Windows-Geolocation-WLPAdm.adml” and “LocationProviderADM.adml” present in C:\Windows\PolicyDefinitions\en-us gets rewritten or corrupted during up gradation.
Below are the steps to Fix: Namespace error with gpedit.msc Windows 10
Solution: Delete these files mentioned above
First Step: Taking ownership of all these files:
- Press Windows logo key + X ( To open power menu in Windows 10)
- Press A & click on yes when prompted
- This will open the command prompt with elevated privileges
- Now, type in these four commands one by one. Press Enter after each one of them to execute
takeown /F ” C:\Windows\PolicyDefinitions\Microsoft-Windows-Geolocation-WLPAdm.admx” /A
takeown /F ” C:\Windows\PolicyDefinitions\en-US\Microsoft-Windows-Geolocation-WLPAdm.adml” /A
takeown /F ” C:\Windows\PolicyDefinitions\LocationProviderADM.admx” /A
takeown /F ” C:\Windows\PolicyDefinitions\en-US\LocationProviderADM.adml ” /A
- Now, Change permissions
- Go to C:\Windows\PolicyDefinitions
- Find the file LocationProviderADM.admx and Microsoft-Windows-Geolocation-WLPAdm.admx
- Right Click the file & Click on Properties
- Go to the security tab
- Click on Administrators
- Click on edit
- Now, again click on administrator
- Check the checkbox that says full control
- Click on Apply and ok
- Now, repeat this step for the remaining three files
- Now, delete all four files
- Try opening gpedit.msc
Hope this helped you, if you have any questions or suggestions, please feel free to write to me.