[研究][BAT]顯示作業系統版本資訊
2024-03-31
C:\>reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
ProductName REG_SZ Windows 10 Pro
C:\>REG Query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /V DisplayVersion
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
DisplayVersion REG_SZ 23H2
C:\>REG Query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /V ReleaseId
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
ReleaseId REG_SZ 2009
C:\>REG Query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /V CSDVersion
錯誤: 系統找不到指定的登錄機碼或值。
C:\>Reg Query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v BuildLabEx
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
BuildLabEx REG_SZ 22621.1.amd64fre.ni_release.220506-1250
C:\>ver
Microsoft Windows [版本 10.0.22631.3296]
C:\>
|
PowerShell
Windows PowerShell
著作權(C) Microsoft Corporation。保留擁有權利。
安裝最新的 PowerShell 以取得新功能和改進功能!https://aka.ms/PSWindows
PS C:\Users\user1> Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName
ProductName : Windows 10 Pro
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT
PSChildName : CurrentVersion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PS C:\Users\user1>
|
(完)
相關
沒有留言:
張貼留言