嗨我無法理解此代碼。有人可以幫我解釋它的作用嗎?檢查操作系統版本
GetOperatingSystemVersion
If OSVersion > 6.0 Then
strCMD = "c:\Windows\System32\manage-bde.exe "
Else
strCMD = "cscript.exe c:\Windows\System32\manage-bde.wsf "
End If`
Sub GetOperatingSystemVersion
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set oss = objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")`
For Each os in oss
OSVersion = Left(os.Version,3)
OSVersion = Round(OSVersion,3)
Next
End Sub
從我的理解,它會調用GetOperatingSystemVersion並檢查for循環。這是我不明白的部分。預先感謝您:)
哇,謝謝科迪的快速回復。現在我明白了這個功能的作用。先生非常感謝您! – amirul