致力于为用户提供真实的
主机测评数据及优惠信息

win11无法运行bat文件,怎么解决

网友 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 说:

保存,导入试试

  1. Windows Registry Editor Version 5.00
  2. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\.bat]
  3. @=&*uot;batfile&*uot;
  4. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\.bat\PersistentHandler]
  5. @=&*uot;{5e941d80-bf**-11cd-b579-08002b30bfeb}&*uot;
  6. [HKEY_CL***ES_ROOT\.bat]
  7. @=&*uot;batfile&*uot;
  8. [HKEY_CL***ES_ROOT\.bat\PersistentHandler]
  9. @=&*uot;{5e941d80-bf**-11cd-b579-08002b30bfeb}&*uot;
  10. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile]
  11. @=&*uot;Windows Batch File&*uot;
  12. &*uot;EditFlags&*uot;=hex:30,04,00,00
  13. &*uot;F**endlyTypeName&*uot;=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
  14.   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,\
  15.   32,00,5c,00,61,00,63,00,70,00,70,00,61,00,67,00,65,00,2e,00,**,00,6c,00,6c,\
  16.   00,2c,00,2d,00,36,00,30,00,30,00,32,00,00,00
  17. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\Def**ltIcon]
  18. @=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,\
  19.   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,\
  20.   61,00,67,00,65,00,72,00,65,00,73,00,2e,00,**,00,6c,00,6c,00,2c,00,2d,00,36,\
  21.   00,38,00,00,00
  22. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell]
  23. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\edit]
  24. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\edit\command]
  25. @=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,\
  26.   00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,**,00,\
  27.   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,\
  28.   00
  29. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\open]
  30. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\open\command]
  31. @=&*uot;&*uot;%1&*uot; %*&*uot;
  32. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\p**nt]
  33. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\p**nt\command]
  34. @=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,\
  35.   00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,**,00,\
  36.   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,\
  37.   00,25,00,31,00,00,00
  38. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\runas]
  39. &*uot;HasLUAShield&*uot;=&*uot;&*uot;
  40. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\runas\command]
  41. @=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,\
  42.   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,\
  43.   **,00,2e,00,65,00,78,00,65,00,20,00,2f,00,43,00,20,00,22,00,25,00,31,00,22,\
  44.   00,20,00,25,00,2a,00,00,00
  45. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\runasuser]
  46. @=&*uot;@shell32.dll,-50944&*uot;
  47. &*uot;Extended&*uot;=&*uot;&*uot;
  48. &*uot;Suppre**ionPolicyEx&*uot;=&*uot;{F211AA05-D4DF-4370-A2A0-9F19C09756A7}&*uot;
  49. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shell\runasuser\command]
  50. &*uot;DelegateExecute&*uot;=&*uot;{ea72d00e-4**0-42fa-ba92-7792a7944c1d}&*uot;
  51. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex]
  52. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\-ContextMenuHandlers]
  53. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\-ContextMenuHandlers\Compatibility]
  54. @=&*uot;{1d27f844-3a1f-4410-85ac-14651078412d}&*uot;
  55. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\ContextMenuHandlers]
  56. @=&*uot;Compatibility&*uot;
  57. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\ContextMenuHandlers\OpenGLShExt]
  58. @=&*uot;{E97DEC16-A50D-49bb-AE24-CF682282E08D}&*uot;
  59. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\D**pHandler]
  60. @=&*uot;{86C86720-42A0-1069-A2E8-08002B30309D}&*uot;
  61. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\P**pertySheetHandlers]
  62. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\P**pertySheetHandlers\ShimLayer P**perty Page]
  63. @=&*uot;{513D916F-2A8E-4F51-AEAB-0C**76FB1AF8}&*uot;
  64. [HKEY_LOCAL_MACHINE\SOF**ARE\Cla**es\batfile\shellex\{8895b1c6-b41f-4c1c-a562-0d5**250836f}]
  65. @=&*uot;{1531d583-8375-4d3f-b5fb-d23bbd169f22}&*uot;

网友 雅丶涵 说:

exe和bat都是注册表注册过的执行文件,你可以把exe的注册表拿来看看

网友 *werttaa 说:

改扩展名pif试试?

或者搜一下cmd2exe、bat2exe

网友 ahaka 说:

*werttaa 发表于 2022-6-7 12:13
改扩展名pif试试?

或者搜一下cmd2exe、bat2exe
网友 ahaka 说:

雅丶涵 发表于 2022-6-7 12:11
exe和bat都是注册表注册过的执行文件,你可以把exe的注册表拿来看看
网友 *****ii 说:

改后缀.com或者.exe试试,注册表动了手脚

网友 我是坏虫 说:

重装,简单轻松解决问题

网友 574722031 说:

改成.cmd后缀试试

赞(0) 打赏
未经允许不得转载:爱主机 » win11无法运行bat文件,怎么解决
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址