HarmonyOS 鸿蒙Next Preview failed, 发现是hvigor检查进程写死"C:\Windows\System32\wbem\wmic",我的系统在E盘,请问如何设置?

HarmonyOS 鸿蒙Next Preview failed, 发现是hvigor检查进程写死"C:\Windows\System32\wbem\wmic",我的系统在E盘,请问如何设置?

cke_1252.png

cke_2265.png

2023-09-25 17:35:53,537 [ 743034] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Execution command: ‘[C:\Windows\System32\wbem\wmic process where processid=“19032” get processid,caption,commandline]’

2023-09-25 17:35:53,537 [ 743034] WARN - #com.huawei.hvigor.utils.HvigorProcessUtil - Failed to execute the command to check whether the process exists.

2023-09-25 17:35:53,537 [ 743034] WARN - #com.huawei.hvigor.run.HvigorRunManagerImpl - The process with pid 19032 does not exist.

2023-09-25 17:35:53,537 [ 743034] WARN - #com.huawei.hvigor.run.HvigorRunManagerImpl - Registry information is incorrect. The daemon info node with pid 19032 will be deleted.


更多关于HarmonyOS 鸿蒙Next Preview failed, 发现是hvigor检查进程写死"C:\Windows\System32\wbem\wmic",我的系统在E盘,请问如何设置?的实战教程也可以访问 https://www.itying.com/category-93-b0.html

6 回复

终于找到workaround了, 之前以为是构建问题, 只在@ohos/hvigor里找, 原来是IDE的问题.

  1. 找到IDE安装目录下的plugins\hvigor-support\lib\hvigor-support-3.1.0.501.jar, 先复制备份一下

  2. 解压后反编译查看com\huawei\hvigor\utils\HvigorProcessUtil.class

  3. 修改成自己系统所在的盘符, 再把修改好的.class文件放回jar包, 重启IDE就行了

更多关于HarmonyOS 鸿蒙Next Preview failed, 发现是hvigor检查进程写死"C:\Windows\System32\wbem\wmic",我的系统在E盘,请问如何设置?的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


该问题已反馈给相关人员,请耐心等待!

请问有答复了没?

对于写死"C:\Windows\System32\wbem\wmic",目前确实存在,已有相关规划正在改进!

姓名:张三
职业:软件工程师
简介:具有五年软件开发经验,熟悉Java、Python和C++。

HarmonyOS鸿蒙Next Preview失败,原因是hvigor检查进程写死了"C:\Windows\System32\wbem\wmic",而系统在E盘。可以通过修改hvigor的配置文件来解决问题。找到hvigor的配置文件,通常位于项目的根目录或构建配置目录中。打开配置文件,查找与wmic相关的路径设置,将路径从"C:\Windows\System32\wbem\wmic"修改为"E:\Windows\System32\wbem\wmic"。保存配置文件后,重新运行鸿蒙Next Preview。如果配置文件中没有直接指定wmic路径,可能需要检查构建脚本或环境变量,确保其指向正确的系统目录。
回到顶部