AutoIT 和报价

AutoIT and quotes

我需要创建 AutoIT 脚本来调用它:

wmic path win32_tcpipprinterport where "hostaddress = 'server1'"  set hostaddress="server2"

尝试像这样组合引号:

$CMD = 'wmic path win32_tcpipprinterport where ""hostaddress = ''server1''""  set hostaddress=""server2"" & pause'

RunWait(@ComSpec & " /c " & $CMD)

但仍然无法正常工作。 请问你能帮忙吗?

But still cannot make it working.

示例:

$sCmd = 'wmic path win32_tcpipprinterport where "hostaddress = ''server1''" set hostaddress="server2"'

Related.