for /F "delims=" %i in ('REG QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImControllerService /v ImagePath ^|find /i "ImagePath"') do ( set PathValue=%i)
SET IMC=%PathValue:~34%( 这个是IMC变量中存放的字符串:%SystemRoot%\Lenovo\ImController\Service\Lenovo.Modern.ImController.exe)
IF EXIST %IMC% set jg_path_to_service=%imcpath%(到这一步怎么都无法将变量赋给 jp_path_to_service,但是这个路径是存在的)
可以使用变量的。如果无法判断,那么说明IMC得到的值有问题。或路径对应的文件不存在导致的。
建议您先用echo回显一下IMC的值,如果有显示路径,那么然后去对应的路径中看看,该文件是否存在。
建议您先用echo回显一下IMC的值,如果有显示路径,那么然后去对应的路径中看看,该文件是否存在。
温馨提示:答案为网友推荐,仅供参考