Monday, July 15, 2019

windows - Batch file WMIC command output as variable issue

I am trying to get an output from a WMIC command to set as variable, For some reason it does not work. Can someone assist. This is what I am trying to do




for /f "tokens=*" %q IN (' WMIC /Node^:Comp1 PATH Win32_UserProfile WHERE LocalPath="C:\\users\\ABC1" GET Status ^| find /V "Status" ') do set pat= %q


Is there something wrong that I am doing?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...