AutoIT and quotes

一曲冷凌霜 提交于 2019-12-11 15:48:52

问题


I need to create AutoIT script which will call this:

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

tried to combine quotes like this:

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

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

But still cannot make it working. Please can you help ?


回答1:


But still cannot make it working.

Example:

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

Related.



来源:https://stackoverflow.com/questions/55023193/autoit-and-quotes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!