Environment variable for volume names in Windows?
        Posted  
        
            by 
                Shinrai
            
        on Super User
        
        See other posts from Super User
        
            or by Shinrai
        
        
        
        Published on 2011-03-11T15:45:57Z
        Indexed on 
            2011/03/11
            16:12 UTC
        
        
        Read the original article
        Hit count: 315
        
Windows
|batch-file
I'm trying to write a batch file that will look at the volume label of the current drive and report if it's not equivalent to a certain string.
Is there a default variable in the shell for this? Can I define one? Am I SOL and I'll actually have to do some (shudder) programming?
EDIT: If this is possible in PowerShell that would work fine.
(For the curious, we ship our machines with software cloning as a rapid bootable backup solution since most of our customers are daytraders and aren't interested in RAID due to urgency of getting-the-hell-back-to-work-right-away if there's a software corruption problem, and we want to make it immediately obvious if they're booting to the backup drive unintentionally, like say the primary failed entirely. The hope was just to write a simple batch file that would autostart on boot and throw a warning in the event of a problem.)
© Super User or respective owner