Check Volume Serial Number

August 28, 2011 at 23:42:39
Specs: Windows Server 2008 R2
Hi, I have a script that loads at boot up to map drives and launch some programs I'm wondering if there is a way to verify that a drive is present with the volume number specified before launching programmes.


Check Volume Number matches AHDA-1243 if matches go to launch

I would like to expand this in the future to checking that the Volume Serial Number is mapped to the correct drive letter and if not change to the correct drive.

Any suggestions as to the best way to do this welcome

Thank You

See More: Check Volume Serial Number

Report •

August 30, 2011 at 07:26:10
If you have administrator rights;

Check the wmic diskdrive command.

Dump information into a text file, and parse it with the for /f command.

Good Luck,


Happy is ONE who says I am an OttoMAN.

Report •

September 1, 2011 at 09:00:02
If you know the drive letter and the serial number, it's an easy test:
vol c: | find "AHDA-1243" || @echo Not there

Changing it on the other hand. . .

How To Ask Questions The Smart Way

Report •

Related Solutions

Ask Question