Crap, just noticed the one Tim sent does not base it on volume name.

Adrian

On Fri, Mar 12, 2010 at 2:02 PM, Adrian Crenshaw <[email protected]>wrote:

> I can't be sure Powershell is on the system.  Tim Medin gave me s slightly
> different version of this, which works:
>
> cmd /c for /F %i in ('WMIC logicaldisk where "DriveType=2" list brief ^|
> find ":"') do %i\myscript.bat
>
>
> Thanks,
> Adrian
>
>
> On Fri, Mar 12, 2010 at 1:00 PM, Norman Rach <[email protected]> wrote:
>
>>  Here's the powershell option:
>>
>> Get-WmiObject Win32_LogicalDisk | Where-Object {$_.drivetype -eq 2} | fl *
>>
>> If you know the VolumeSerialNumber, you can just alter the script:
>>
>> Get-WmiObject Win32_LogicalDisk | Where-Object {$_.VolumeSerialNumber -eq
>> <whatever>} | fl *
>>
>>
>> If you want to leverage the native os, there's vbscript.  I'm a little
>> rusty but it will probably look similar to this:
>>
>> Set objWMIService = GetObject ("winmgmts:\\" & strComputer &
>> "\root\cimv2")
>> Set colItems = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk
>> where DriveType=2")
>>
>> Thanks!
>>
>> ------------------------------
>> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
>> now. <http://clk.atdmt.com/GBL/go/210850552/direct/01/>
>>
>> _______________________________________________
>> Pauldotcom mailing list
>> [email protected]
>> http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
>> Main Web Site: http://pauldotcom.com
>>
>
>
_______________________________________________
Pauldotcom mailing list
[email protected]
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com

Reply via email to