Windows cannot find the file ‘gpedit.msc‘. Please make sure the file name is correct and try again. (solved)

I got an error today when I used the command gpedit.msc to open the Group Policy Editor.

Windows 找不到文件 'gpedit.msc'。请确定文件名是否正确后,再试一次。

That’s outrageous, I didn’t change the settings or anything
I later found a solution (reinstall)

  1. Create a new txt document on the desktop
  2. Enter content in the document
@echo off

pushd "%~dp0"

dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt

dir /b C:\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt

for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"C:\Windows\servicing\Packages\%%i"
  1. Save it in dat format (if you find it troublesome and don’t want to operate it, you can download it here:https://download.csdn.net/download/qq_53891711/88294490< a i=2>)
  2. Right-click to run as administrator and wait for the installation to complete (note that the computer needs to be connected to the Internet!!!)
  3. If the progress bar does not move for a long time, you can press Enter to prevent it from getting stuck.

Then the problem is solved! ! !

Guess you like

Origin blog.csdn.net/qq_53891711/article/details/132652333