I have an issue with sending an input to cmd that looks like this:
SendInput wmic /node:%Target% product where name="%product%" call uninstall
The issue is that after the input has been sent, it looks like this:
C:\Users\username\folder>wmic /node:localhost product where name="Name"
call uninstall
There is an entire new line, If the %product% is just a string, the new line does not appear, it seems to be an issue with adding a variable, however I am new to Autohotkey and I can't tell what could be causing this.
Thanks in advance
Update:
I manged to get it fixed by using AutoTrim, it took me a while to find a working example for some reason. This is what I ended up doing.
Appname = %Appname%
SendInput wmic /node:%Target% product where name="%Appname%" call uninstall
The Appname is actually an option from the wmic product output, it was as @Jim U suggested an issue with a trailing newline. Thanks for the help guys.
/node:%Target%
" go? – phil294