SReject commented on a Page, HWID serial numbers.  -  Nov 11, 2011

My version:

alias _hdd {
  var %e, %b = 1

  .comopen dv Scripting.FileSystemObject
  if ($comerr) {
    %e = Unable to create a FileSystemObject
  }
  elseif (!$com(dv,drives,3,dispatch * dv2)) {
    %e = Unable to get drives from FileSystemObject
  }
  elseif ($com(dv2)) {
    while ($comval(dv2,%b,path) $comval(dv2,%b,serialnumber) != $chr(32)) {
      !echo -: $v1
      inc %b
    }
  }
  else {
    %e = No drives found.
  }

  :error
  if ($com(dv)) .comclose $v1
  if ($com(dv2)) .comclose $v1
  if ($iif(%e,$v1,$error)) {
    !echo - Error: $v1
    reseterror
  }  
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.