Hello rishavpreet,
I am nor sure if I fully understand your question. The default command line tool to read a drive's serial number is "vol":
Execute it via exec, parse the result, check for common wrong results as well ("volume not found" etc).
Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0