| |
sudo911
Posts: 2
Score: 0
Joined: 8/10/2007
Status: offline
|
Hi, I'm very experienced with batch, however limitations such as not being able to interrogate hardware devices has me using vbs code. Can I run vbscript directly in my batch files rather than having to shell out to run a vbs file with cscript? Below is the code I want to use to evaluate the fixed disks in my system: Option Explicit set FSO = CreateObject("Scripting.FileSystemObject") Dim WshShell,FSO,Drv,Dtype,Dfree,Dtot Dim Dname,Dpct,Dused,Dserial,Dinfo For Each drv in FSO.Drives if drv.DriveType=2 then Wscript.Echo "Drive letter: " & drv.DriveLetter if drv.Drivetype=2 then Wscript.Echo "Drive type: " & drv.DriveType Next Any help greatly appreciated!
|
|