KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

WMI Explorer Problem with Spaces

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Other
View previous topic :: View next topic  
Author Message
rollohmasker



Joined: 08 Jan 2007
Posts: 16

PostPosted: Wed May 19, 2010 7:06 am    Post subject: WMI Explorer Problem with Spaces Reply with quote

Hello,
i have a question about the wmiexplorer.
I have 10 processes named Service.exe, and the only difference i can find is the Property CommandLine with the Value "C:\Program Files\TXN Systems\Txn\Service.exe" -id 39

In the wmiexplorer i created the following query.
But it doesn`t work. I think it is a problem with the spaces in the CommandLine String.
select VirtualSize from Win32_Process where name='Service.exe' AND CommandLine=' "C:\Program Files\TXN Systems\Txn\Service.exe" -id 39'

Do you see what I did wrong in this case?
Best regards
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 11761
Location: USA

PostPosted: Wed May 19, 2010 11:15 am    Post subject: Reply with quote

You are using single and double quotation marks for 1 variable. In such case you should use backslash (\) to quote special symbols like \ or ".
For example your query should look like
select VirtualSize from Win32_Process where name="Service.exe" AND CommandLine="\"C:\\Program Files\\TXN Systems\\Txn\\Service.exe\" -id 39"

Regards
Alex
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Other All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index