乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      分享vbs腳本辦事的樂趣

       xiezuoru 2006-06-12
      今天偶然發(fā)現(xiàn)金庸網(wǎng)游的文件夾下的cur和ani格式的圖標(biāo)文件都不錯(cuò),于是把它們復(fù)制到C:\ye下,按照我的習(xí)慣,我會(huì)把文件名改名為1.cur,2.ani這樣的寫法,于是想起來vbs腳本. 可以存放于任意目錄下.
      ------aa.vbs--------

      程序代碼 程序代碼
      dim fso,yexj00,s
      s=0
      set fso=createobject("Scripting.FileSystemObject") ‘聲明fso對(duì)象
      set yexj00=fso.GetFolder("C:\ye\") ‘獲取文件夾對(duì)象,賦于yexj00
      for each i in yexj00.files ‘循環(huán)玫舉yexj00文件夾對(duì)象下的所有子集,即文件.
      if fso.GetExtensionName(i)="cur" or fso.GetExtensionName(i)="ani" then ‘如果擴(kuò)展名為cur或ani才執(zhí)行下面的操作,否則不操作
      s=s+1 ‘s加1,此時(shí)s為數(shù)值
      fso.GetFile(i).name=CStr(s)+"."+fso.GetExtensionName(i) ‘重命名文件名為理想格式,CStr(s)是將原先的數(shù)值s轉(zhuǎn)換為字符串.
      end if
      next


      用WMI對(duì)象列出系統(tǒng)所有進(jìn)程:

      ----Instance.vbs----

      程序代碼 程序代碼
      Dim WMI,objs
      Set WMI = GetObject("WinMgmts:")
      Set objs = WMI.InstancesOf("Win32_Process")
      For Each obj In objs
      Enum1 = Enum1 + obj.Description + Chr(13) + Chr(10)
      Next
      msgbox Enum1


      獲得物理內(nèi)存的容量:

      -----physicalMemory.vbs-----

      程序代碼 程序代碼
      strComputer = "."

      Set wbemServices = GetObject("winmgmts:\\" & strComputer)
      Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")

      For Each wbemObject In wbemObjectSet
      WScript.Echo "物理內(nèi)存 (MB): " & CInt(wbemObject.TotalPhysicalMemory/1024)
      Next


      取得系統(tǒng)所有服務(wù)及運(yùn)行狀態(tài)

      ----service.vbs----
      程序代碼 程序代碼
      Set ServiceSet = GetObject("winmgmts:").InstancesOf("Win32_Service")
      Dim s,infor
      infor=""
      for each s in ServiceSet
      infor=infor+s.Description+" ==> "+s.State+chr(13)+chr(10)
      next
      msgbox infor


      CPU的序列號(hào):

      ---CPUID.vbs---

      程序代碼 程序代碼
      Dim cpuInfo
      cpuInfo = ""
      set moc = GetObject("Winmgmts:").InstancesOf("Win32_Processor")
      for each mo in moc
      cpuInfo = CStr(mo.ProcessorId)
      msgbox "CPU SerialNumber is : " & cpuInfo
      next


      硬盤型號(hào):
      ---HDID.vbs---
      程序代碼 程序代碼
      Dim HDid,moc
      set moc =GetObject("Winmgmts:").InstancesOf("Win32_DiskDrive")
      for each mo in moc
      HDid = mo.Model
      msgbox "硬盤型號(hào)為:" & HDid
      next


      網(wǎng)卡MAC物理地址:

      ---MACAddress.vbs---
      程序代碼 程序代碼
      Dim mc
      set mc=GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
      for each mo in mc
      if mo.IPEnabled=true then
      msgbox "網(wǎng)卡MAC地址是: " & mo.MacAddress
      exit for
      end if
      next


      測(cè)試你的顯卡:
      程序代碼 程序代碼

      On Error Resume Next
      Dim ye
      Dim yexj00
      set yexj00=GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_VideoController")
      for each ye in yexj00
      msgbox "型 號(hào): " & ye.VideoProcessor & vbCrLf & "廠 商: " & ye.AdapterCompatibility & vbCrLf & "名 稱: " & ye.Name & vbCrLf & "狀 態(tài): " & ye.Status & vbCrLf & "顯 存: " & (ye.AdapterRAM\1024000) & "MB" & vbCrLf & "驅(qū) 動(dòng)(dll): " & ye.InstalledDisplayDrivers & vbCrLf & "驅(qū) 動(dòng)(inf): " & ye.infFilename & vbCrLf & "版 本: " & ye.DriverVersion
      next

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多