win10 bat文件双击不能运行?
1、右键单击[计算机],查找并打开[属性]。
2、点击“高级系统设置”找到编辑环境变量选项。
3、找哪逗核到“advanced”选项。环境变量选项可以在选项接口中看到。
4、点击“环境变量”选项,设置用户变量和系统变量。
5、创建一个新的用户变量:username:%path%,变量值:C:/Windows/System32,然后单击OK。李掘
6、在user变量中查找路径;单击编辑。
7、在系指轮统变量中选择path,点击编辑按钮。
8、添加%PATH%并保存,系统就可以运行BAT文件。
配置环境变量依然不好使和我同情况的哥们,可以试试这个方法:很多人可能都遇到过,莫名被某些垃圾清理软件坑了悄岩(真“垃圾”清理软件),导致电脑某些功能不好使了,比如说我电脑之前C盘d盘连属性都打不开了,右键快捷方式都没了,不过好在网上大神多,这几项后来照网上解决了,唯独一个问题,bat批处理文件全部不能响应了,双击无响应,软件调用的会报错,而无数软件都有需要调用bat文件的情况,各种报错bug层出不穷,然而!!网上找不到相关教程,得到的只有一堆粘贴复制的大宝贝,告诉你添加环境变量,太无语了,一度想重做系统……
后来突然想起我朋友接opencv时都常上某谷歌来寻找办法,就寻思死马当活马医,用英文上某谷歌检索看看国外有没有解决方法,后来果然有高滚昌人,完美解决!
每个人电脑环境不同,问题原因也不一定相同,所以操作前,务必在注册表右键导大运扒出所有现有内容!!!以防万一,万一我这个方法对你不适用甚至出现别的问题有一个退路!
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.bat]
@="batfile"
[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[HKEY_CLASSES_ROOT\batfile]
@="Windows Batch File"
"EditFlags"=hex:30,04,00,00
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,\
32,00,5c,00,61,00,63,00,70,00,70,00,61,00,67,00,65,00,2e,00,64,00,6c,00,6c,\
00,2c,00,2d,00,36,00,30,00,30,00,32,00,00,00
[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,6d,00,\
61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,36,\
00,38,00,00,00
[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
00
[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00
[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"
[HKEY_CLASSES_ROOT\batfile\shell\print]
[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00
[HKEY_CLASSES_ROOT\batfile\shell\runas]
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\batfile\shell\runas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6d,00,\
64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,43,00,20,00,22,00,25,00,31,00,22,\
00,20,00,25,00,2a,00,00,00
[HKEY_CLASSES_ROOT\batfile\shell\runasuser]
@="@shell32.dll,-50944"
"Extended"=""
"SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}"
[HKEY_CLASSES_ROOT\batfile\shell\runasuser\command]
"DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}"
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat\OpenWithProgids]
"batfile"=hex(0):
记事本编辑,然后粘贴进去,最后格式保存成reg,然后双击运行,同意即可。
记住一定要先备份!
转自csdn,实测有效:网页链接
广告 您可能关注的内容 |