skip 0 #1 February 9, 2005 With so many geeks present and the success I’ve seen in past threads here I might as well give you guys a shot at this. I am writing a script in which I need to access a removable hard drive on several different computers – however I will not be sure from machine to machine what drive letter will be assigned to the drive. What I have come up with is querying all type 3 disks on the machine and selecting the one that is not named C: I think my logic is correct but my syntax wrong – however my logic could be wrong as well. I am completely new to scripting and in fact this is really the first WQL Query I’ve ever constructed. Here is the code. Set colDisks = objWMIService.ExecQuery _ Select * from Win32_LogicalDisk Where DriveType=3 AND Name != "C:" Anyone have any experience or opinions on this? Thanks neil Quote Share this post Link to post Share on other sites
CrazyIvan 0 #2 February 9, 2005 I don't know much about windows scripting, but in regular programming, in order to find out the kind of drive, you get the ATTRIBUTES of the drive, it will tell you if the drive is a LOCAL drive NETWORK or otherwise.__________________________________________ Blue Skies and May the Force be with you. Quote Share this post Link to post Share on other sites