Scripting Runtime Library(FileSystemObject)

µð½ºÅ© º¼·ýÀ» °íÀ¯ÇÏ°Ô ½Äº°ÇÏ´Â µ¥ »ç¿ëµÇ´Â ½ÊÁø¼öÀÇ ÀÏ·Ã ¹øÈ£¸¦ ¹ÝȯÇÑ´Ù.

Àμö
object : (°³Ã¼)

object´Â Ç×»ó Drive °³Ã¼ÀÌ´Ù.

: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº µð½ºÅ© º¼·ýÀ» °íÀ¯ÇÏ°Ô ½Äº°ÇÏ´Â µ¥ »ç¿ëµÇ´Â ½ÊÁø¼öÀÇ ÀÏ·Ã ¹øÈ£¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.

Ư±â

SerialNumber ¼Ó¼ºÀ» »ç¿ëÇÏ¿© À̵¿½Ä ¹Ìµð¾î¸¦ ÀåÂøÇÑ µå¶óÀ̺꿡 ¿Ã¹Ù¸¥ µð½ºÅ©¸¦ ³Ö¾ú´ÂÁö È®ÀÎÇÒ ¼ö ÀÖ´Ù.


SerialNumber ¼Ó¼º ¿¹Á¦

°á°ú Ç¥½Ãâ
JScript SerialNumber ¼Ó¼º ¿¹Á¦
<SCRIPT language=JScript>
function SerialNumberTest(){
  var fso,driveObj,drvType,str='';
  fso=new ActiveXObject('Scripting.FileSystemObject');
  enumObj=new Enumerator(fso.Drives);
  for (; !enumObj.atEnd(); enumObj.moveNext()){
    driveObj=enumObj.item();
    switch (driveObj.DriveType){
      case 0: drvType='¾Ë ¼ö ¾øÀ½'; break;
      case 1: drvType='À̵¿½Ä'; break;
      case 2: drvType='°íÁ¤½Ä'; break;
      case 3: drvType='³×Æ®¿öÅ©'; break;
      case 4: drvType='CD-ROM'; break;
      case 5: drvType='RAM µð½ºÅ©'; break;
    }
    str+='µå¶óÀ̺ê '+driveObj.DriveLetter+': - '+drvType+' : ';
    if (driveObj.IsReady){
      str+=driveObj.SerialNumber;
      str+=' (Hex:'+driveObj.SerialNumber.toString(16).toUpperCase()+')<BR>';
    } else str+='Áغñ ¾ÈµÊ<BR>';
  }
  return(str);
}
</SCRIPT>

<DIV id=showjs class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="id=showjs.innerHTML=SerialNumberTest()">
  <SPAN class=ie>JScript</SPAN> <SPAN class=property>SerialNumber</SPAN> ¼Ó¼º ¿¹Á¦</DIV>

VBScript·Î ¹Ýº¹

°á°ú Ç¥½Ãâ
VBScript SerialNumber ¼Ó¼º ¿¹Á¦
<SCRIPT language=VBScript>
Function SerialNumberTestvb
  Dim fso,driveObj,drvType
  str=""
  Set fso=CreateObject("Scripting.FileSystemObject")
  Set drivesCol=fso.Drives
  For Each driveObj in drivesCol
    Select Case driveObj.DriveType
      Case 0: drvType="¾Ë ¼ö ¾øÀ½"
      Case 1: drvType="À̵¿½Ä"
      Case 2: drvType="°íÁ¤½Ä"
      Case 3: drvType="³×Æ®¿öÅ©"
      Case 4: drvType="CD-ROM"
      Case 5: drvType="RAM µð½ºÅ©"
    End Select
    str=str&"µå¶óÀ̺ê "&driveObj.DriveLetter&": - "&drvType&" : "
    If driveObj.IsReady Then
      str=str&driveObj.SerialNumber&"<BR>"
    Else str=str&"Áغñ ¾ÈµÊ<BR>"
    End If
  Next
  SerialNumberTestvb=str
End Function
</SCRIPT>

<DIV id=showvb class=show alt="°á°ú">°á°ú Ç¥½Ãâ</DIV>
<DIV class=show onClick="showvb.innerHTML=SerialNumberTestvb()">
  <SPAN class=ie>VBScript</SPAN> <SPAN class=property>SerialNumber</SPAN> ¼Ó¼º ¿¹Á¦</DIV>