3

windows找不到文件gpedit.msc

 6 months ago
source link: https://caoniang.net/9817.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

很多用户使用电脑的时候,系统提示Win10找不到组策略gpedit.msc,请确定文件是否正确,再试一次的错误情况,这是怎么一回事呢?可能是电脑的软件出了问题,需要打开misconfig或者regedit来修改,具体的方法下面一起来看看吧。

win10找不到文件gpedit.msc的解决方法

1、首先同时按键盘上的WIN+R键,打开运行对话框,输入notepad打开记事本。

20230203145844_97760.png

2、然后在记事本中保存如下批处理内容:

【@echo off

  pushd "%~dp0"

  dir /b %systemroot%\Windows\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >gp.txt

  dir /b %systemroot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>gp.txt

  for /f %%i in ('findstr /i . gp.txt 2^>nul') do dism /online /norestart /add-package:"%systemroot%\servicing\Packages\%%i"

  pause】

20230203145837_82612.png

说明:通过dir命令遍历系统盘servicing目录,寻找组策略的配置包,找到后写入到gp.txt文件,然后通过dism命令来安装组策略包。

3、接下来点击右上角的【文件】——【另存为】。在弹出的界面中选择保存路径、文件名(这里命名为gpedit.bat),注意文件类型为“所有文件”,只有这样才能保证gpedit.bat是一个批处理文件。

20230203145831_94916.png

4、然后在保存的gpedit.bat上右键选择并点击【以管理员身份运行】,上面在批处理代码介绍中已经说过了,dism命令需要管理员权限,所以批处理必须以管理员身份运行。

20230203145823_14915.png

5、最后等待批处理执行完毕即可。这时候同时按WIN+R键打开运行输入gpedit.msc,按回车键或者确定按钮就行了。

20230203145816_80066.png

延伸阅读:windows找不到文件


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK