Student Mode Code Display

Welcome to the Fraternity!

Commenting has been enabled. You can comment on all the Code Items now.

FSO To show the drive type is Fixed Local Network CD ROM or other


Add This Code to My Favourite List
Enter Email

Contributed By Neeraj Kumar Pandey
Date 2014-03-08 07:36:15

'############################################################################
'To show the drive type is Fixed(Local), Network, CD-ROM or other
'############################################################################

Public Function ShowDriveType(drvpath)
   'Declare variables
   Dim oFSO, oDrive, strDriveType
   'Instantiate the filesystem object
   Set oFSO = CreateObject("Scripting.FileSystemObject")
   'Get the drive object based on the path	
   Set oDrive = oFSO.GetDrive(drvpath)
   'Assign the drive type based on the value, these are the types of drives available
   Select Case oDrive.DriveType
      Case 0: strDriveType = "Unknown"
      Case 1: strDriveType = "Removable"
      Case 2: strDriveType = "Fixed"
      Case 3: strDriveType = "Network"
      Case 4: strDriveType = "CD-ROM"
      Case 5: strDriveType = "RAM Disk"
   End Select
   'Return the drive name and its type as a string
   ShowDriveType = "Drive " & oDrive.DriveLetter & ": - " & strDriveType
End Function

'Call the function to display the drive type
Msgbox ShowDriveType("D:\")

Download Above Code

Comments:


Updated by Babiche at 2016-02-20 13:48:27
The accents could be the perolbm, but im not sure.I dont see them on an English server.You could troubleshoot it by inserting a messagebox popup on line 60:wscript.echo objHPVHost.Namethen you know if the script accepts the french translation Syste8me informatique d’he9bergement .same goes for the virtual machine equivalent.Or you could use an english server ;]good luck!Sander
Updated by Cintia at 2016-03-02 05:35:37
Thanks for your comment. I sent your<a href="http://lvoeetwmlxj.com"> qeutsion</a> to the author.From what machine do you run the script?I can confirm this script works with English localization. Perhaps you can temporarily change it on the machine you are running the script.Regards, Hans
Updated by Sagrario at 2016-03-02 10:52:34
Ideally special 26 shloud not have any songs and if at all then it shloud have been dhad pakad only.Looks like a love track has been added which may appeal to wider audience but will definitely dilute a pure thriller. http://iygpzdwmq.com [url=http://udqmnocrgvz.com]udqmnocrgvz[/url] [link=http://xhimatgk.com]xhimatgk[/link]

Add your comments...
Name : *      
Email : *      
The content of this field will be kept private and will not be shown publicly

Your Comment/Answer *

Enter the text present in this box : *