alienhunter Active Member Licensed User Longtime User Sep 7, 2015 #1 Hi i get this error " Can't handle single and double quotes in same argument" when i try to send a command to shell wmic/output: c:\temp\text.html path Win32_Process WHERE "name like 'notepad.exe'" get /format:hform since notepad.exe has to single quoted inside of a double quote hmmmm how can i avoid this error ? thanks AH
Hi i get this error " Can't handle single and double quotes in same argument" when i try to send a command to shell wmic/output: c:\temp\text.html path Win32_Process WHERE "name like 'notepad.exe'" get /format:hform since notepad.exe has to single quoted inside of a double quote hmmmm how can i avoid this error ? thanks AH
Erel B4X founder Staff member Licensed User Longtime User Sep 7, 2015 #2 Shell parameters cannot include both types of quotes. It is not possible to escape them correctly. What exactly are you trying to run? Upvote 0
Shell parameters cannot include both types of quotes. It is not possible to escape them correctly. What exactly are you trying to run?
alienhunter Active Member Licensed User Longtime User Sep 8, 2015 #3 Erel said: Shell parameters cannot include both types of quotes. It is not possible to escape them correctly. What exactly are you trying to run? Click to expand... Hi , thanks for the response , I am trying to run WMIC_Queries direct from shell , but some work and some not because of the escape problem I might have to delegate this with small individual batch files and pass the variables ,since this will read from different computers over the network if a certain program is running and how much resources it is using . It is working with tasklist but WMIC is faster and has more to offer AH Upvote 0
Erel said: Shell parameters cannot include both types of quotes. It is not possible to escape them correctly. What exactly are you trying to run? Click to expand... Hi , thanks for the response , I am trying to run WMIC_Queries direct from shell , but some work and some not because of the escape problem I might have to delegate this with small individual batch files and pass the variables ,since this will read from different computers over the network if a certain program is running and how much resources it is using . It is working with tasklist but WMIC is faster and has more to offer AH
S sorex Expert Licensed User Longtime User Sep 8, 2015 #4 you can use this aswell Code: Copy wmic/output: c:\temp\text.html path Win32_Process WHERE (name like 'notepad.exe') get /format:hform Upvote 0
you can use this aswell Code: Copy wmic/output: c:\temp\text.html path Win32_Process WHERE (name like 'notepad.exe') get /format:hform