Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 207 Vote(s) - 3.34 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WMIC Returning Odd Serial Number

#1
I have an odd issue. I'm attempting to return the hard drive serial number from WMIC to a variable in a batch file; the line that gives me the variable is:

for /f "skip=2 tokens=2 delims=," %%a in ('wmic diskdrive get serialnumber /FORMAT:CSV') do (set harddisk=%%a)

This assigns what wmic sees as the serial number for the hard drive to a variable, the issue is that the serial number it returns is slightly off. In one example it returns:

3ZVT01H4

But the serial number on the label is:

Z3TV104H

It seems as though it is taking the actual serial number and reversing every two characters; am I typing something wrong or is this a known (but not documented anywhere) issue?

Is there a way that I can take the variable, split it into two character chunks, reverse the order of all those characters, and then put that into a variable?
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through