网友 ahaka 说:
*帖最后由 ahaka 于 2022-6-7 11:52 编辑
双击运行弹出弹出“打开方式”的对话框,让选择:
试了网上的几种方法都不行
网上有很多类似的帖子,方法大致为:
1. 将bat 文件的格式从UTF-8 改成ASNI
2. 添加环境变量,将c:\Windows\******32 添加到环境变量path 中
3. 修改注册表中.bat 相关属性,将其属性值都改成“未设置”
4. 关联成cmd运行
5. 删除注册表batfile
只能手动打开cmd再拖进去才能运行。太是太麻烦了
网友 zxxx 说:
保存,导入试试
- Windows Registry Editor Version 5.00
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\.bat]
- @=&*uot;batfile&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\.bat\PersistentHandler]
- @=&*uot;{5e941d80-bf**-11cd-b579-08002b30bfeb}&*uot;
- [HKEY_CL***ES_ROOT\.bat]
- @=&*uot;batfile&*uot;
- [HKEY_CL***ES_ROOT\.bat\PersistentHandler]
- @=&*uot;{5e941d80-bf**-11cd-b579-08002b30bfeb}&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile]
- @=&*uot;Windows Batch File&*uot;
- &*uot;EditFlags&*uot;=hex:30,04,00,00
- &*uot;F**endlyTypeName&*uot;=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,**,00,6c,00,6c,\
- 00,2c,00,2d,00,36,00,30,00,30,00,32,00,00,00
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\Def**ltIcon]
- @=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,**,00,6c,00,6c,00,2c,00,2d,00,36,\
- 00,38,00,00,00
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell]
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\edit]
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\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,**,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_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\open]
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\open\command]
- @=&*uot;&*uot;%1&*uot; %*&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\p**nt]
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\p**nt\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,**,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_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\runas]
- &*uot;HasLUAShield&*uot;=&*uot;&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\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,\
- **,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_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\runasuser]
- @=&*uot;@shell32.dll,-50944&*uot;
- &*uot;Extended&*uot;=&*uot;&*uot;
- &*uot;Suppre**ionPolicyEx&*uot;=&*uot;{F211AA05-D4DF-4370-A2A0-9F19C09756A7}&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\runasuser\command]
- &*uot;DelegateExecute&*uot;=&*uot;{ea72d00e-4**0-42fa-ba92-7792a7944c1d}&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex]
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\-ContextMenuHandlers]
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\-ContextMenuHandlers\Compatibility]
- @=&*uot;{1d27f844-3a1f-4410-85ac-14651078412d}&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\ContextMenuHandlers]
- @=&*uot;Compatibility&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\ContextMenuHandlers\OpenGLShExt]
- @=&*uot;{E97DEC16-A50D-49bb-AE24-CF682282E08D}&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\D**pHandler]
- @=&*uot;{86C86720-42A0-1069-A2E8-08002B30309D}&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\P**pertySheetHandlers]
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\P**pertySheetHandlers\ShimLayer P**perty Page]
- @=&*uot;{513D916F-2A8E-4F51-AEAB-0C**76FB1AF8}&*uot;
- [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\{8895b1c6-b41f-4c1c-a562-0d5**250836f}]
- @=&*uot;{1531d583-8375-4d3f-b5fb-d23bbd169f22}&*uot;
网友 雅丶涵 说:
exe和bat都是注册表注册过的执行文件,你可以把exe的注册表拿来看看
网友 *werttaa 说:
改扩展名pif试试?
或者搜一下cmd2exe、bat2exe
网友 ahaka 说:
*werttaa 发表于 2022-6-7 12:13
改扩展名pif试试?
改扩展名pif试试?
或者搜一下cmd2exe、bat2exe
网友 ahaka 说:
雅丶涵 发表于 2022-6-7 12:11
exe和bat都是注册表注册过的执行文件,你可以把exe的注册表拿来看看
网友 *****ii 说:
exe和bat都是注册表注册过的执行文件,你可以把exe的注册表拿来看看
网友 *****ii 说:
改后缀.com或者.exe试试,注册表动了手脚
网友 我是坏虫 说:
重装,简单轻松解决问题
网友 574722031 说:
改成.cmd后缀试试
未经允许不得转载:爱主机 » win11无法运行bat文件,怎么解决
爱主机