wmic csproduct get uuid findstr V UUID findstr i a-zA-Z0-9 if errorlevel neq 0 goto UUIDFail wmic csproduct get uuid findstr V UUID find i - if errorlevel neq 0 goto UUIDFail wmic csproduct get
This script is used to check the UUID (Universally Unique Identifier) of the computer's CSProduct. It performs the following steps:
- Uses the
wmiccommand to get the UUID of the CSProduct. - Uses
findstrto filter out the "UUID" header from the output. - Uses
findstrto check if the UUID contains any alphanumeric characters. If it does, it goes to theUUIDFaillabel. - Appends the UUID to a file called "uuid.txt" using
>>. - Uses a
forloop to set theuuidvariable to the value of the UUID. - Uses
findto count the occurrences of the UUID in the "uuid.txt" file. - If the count is greater than 5, it displays a failure message and changes the console color to red.
- Uses another
forloop to count the occurrences of "-" in the "uuid.txt" file. - If the count is greater than 50, it deletes the "uuid.txt" file.
Note: The script assumes that there is a label called UUIDFail defined elsewhere in the script
原文地址: https://www.cveoy.top/t/topic/hEU0 著作权归作者所有。请勿转载和采集!