
This method creates a batch file that will install the necessary components to enable the Group Policy Editor.
Open Notepad

Open Notepad by pressing Win + S, typing "Notepad," and selecting it from the search results.
Paste Code

Paste the following code in Notepad:
Save the file

Go to File > Save As.
Choose All Files as the file type.
Save the file as EnableGPEDIT.bat (make sure the file extension is .bat).

Run the Batch File as Administrator

Right-click on the EnableGPEDIT.bat file and select Run as administrator.
The batch file will run and install the Group Policy components. This may take a few minutes.
Press any key on continue to complete the process.
Restart your computer

Once the installation is complete, restart your PC to apply the changes.
Access Group Policy Editor

After restarting, press Win + R, type gpedit.msc, and press Enter to open the Group Policy Editor.