我需要调整现有批处理文件中的event variable语句,以便在事件日志中包含一个变量。
我尝试过多种方法,但都没能成功。
该语句当前如下所示:
eventcreate /SO "batch file name" /Id 999 /D "specific event" /T INFORMATION /L Application我需要在这样的描述中包含一个变量的值:
eventcreate /SO "batch file name" /Id 999 /D "variable value is %%test%%" /T INFORMATION /L Application我尝试将该变量放在引号之外,但是事件日志条目显示变量名,但没有用变量的实际值替换它。
有人知道这能不能做到吗?
发布于 2022-09-08 23:19:00
/D description Specifies the description text for the new event. (c) eventcreate /?
您认为(变量转义一次)使用%test%而不使用%%test%%是行不通的
“自我更新描述”?我不明白你的意思。请更新此问题/留下评论/尝试%var%
maybay %test%没有包含一些值?(isn't variable)
检查没有%ProgramFiles%的%%test%% --它是工作的
https://stackoverflow.com/questions/73655580
复制相似问题