In wmic, ‘-‘ is special characters.
how can use negative number for search?
just like
wmic volume where serialnumber=-1874012763
because ‘-‘ is sepcial character, this command is not work.
how can i assign negative number for search in wmic?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The SerialNumber value from Win32_Volume class is an unsigned integer (uint32), there’s no way to query an unsigned integer value using WMIC since you cannot convert the value, you can only list all values:
As far as I know, you can overcome querying an unsigned integer value by scripting it. For example using VBS quering for an unsigned integer value of ‘-1435665788’ (my systems C drive):
The above prompts the drive letter and serial number for the given unsigned integer value. Hope this helps 😉