B4J Question Can't handle single and double quotes in same argument

alienhunter

Active Member
Licensed User
Longtime User
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
 

alienhunter

Active Member
Licensed User
Longtime User
Shell parameters cannot include both types of quotes. It is not possible to escape them correctly.

What exactly are you trying to run?

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

sorex

Expert
Licensed User
Longtime User
you can use this aswell

B4X:
wmic/output: c:\temp\text.html path Win32_Process WHERE (name like 'notepad.exe') get /format:hform
 
Upvote 0
Top