Check volume serial number within a bat file -


im writing batch script run on flash drive. need validate volume serial number of flash drive inside code, therefore nobody should able run different location.

does know how validate serial number inside batch file?

example:

if %vol%==abcd goto else exit 

although there several different ways achieve same thing, original dos/windows command intended manage volumes , serial numbers vol:

@echo off /f "skip=1 tokens=5" %%a in ('vol %~d0') set serial=%%a if %serial% equ abcd-ef01 (     echo valid serial number! ) 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -