Bước 1, tôi sử dụng lệnh sau đây để có được phiên bản IE địa phương của tôi từ cửa sổ dòng lệnh:Truy vấn phiên bản Internet Explorer từ dòng lệnh không phải lúc nào cũng hoạt động?
Nó sẽ làm việc và đưa cho tôi phiên bản IE như thế này:
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer
version REG_SZ 7.0.5730.13
Bước 2, Bây giờ tôi cố gắng sử dụng lệnh này:
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v version" | find "version"
Nó sẽ thất bại và cho tôi biết như sau:
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer
Error: The system was unable to find the specified registry key or value
Bước 3, Bây giờ nếu tôi quay trở lại lệnh đầu tiên:
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v version"
nó sẽ cung cấp cho tôi những lỗi tương tự như ở bước 2. Những gì tôi không hiểu là tại sao bước 2 sẽ thất bại, và tại sao bước 3 sẽ thất bại vì nó giống như bước 1.
Related http://stackoverflow.com/questions/3553984/how-do-i-detect-which-version-of-internet-explorer-is-installed –