' List Disk Partition Properties


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colDiskPartitions = objWMIService.ExecQuery _
    ("Select * from Win32_DiskPartition")

For each objPartition in colDiskPartitions
    Wscript.Echo "Block Size: " & objPartition.BlockSize    
    Wscript.Echo "Bootable: " & objPartition.Bootable
    Wscript.Echo "Boot Partition: " & objPartition.BootPartition
    Wscript.Echo "Description: " & objPartition.Description
    Wscript.Echo "Device ID: " & objPartition.DeviceID      
    Wscript.Echo "Disk Index: " & objPartition.DiskIndex    
    Wscript.Echo "Index: " & objPartition.Index      
    Wscript.Echo "Name: " & objPartition.Name
    Wscript.Echo "Number Of Blocks: " & _
        objPartition.NumberOfBlocks    
    Wscript.Echo "Primary Partition: " & _
        objPartition.PrimaryPartition  
    Wscript.Echo "Size: " & objPartition.Size
    Wscript.Echo "Starting Offset: " & _
        objPartition.StartingOffset    
    Wscript.Echo "Type: " & objPartition.Type
Next

search for scripts

VbsEdit contains all these sample scripts!





Home   Scripts

Copyright © 2001-2019 adersοft