BAT(Cmd) 從 WINDOWS登錄資料庫(REGEDIT.EXE) 檢查 .NET6 是否有安裝 [原理同NSIS偵測 .NET6 是否有安裝]
BAT(Cmd) 從 WINDOWS登錄資料庫(REGEDIT.EXE) 檢查 .NET6 是否有安裝 [原理同NSIS偵測 .NET6 是否有安裝]
code
reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sharedfx\Microsoft.WindowsDesktop.App" | find /i "6.0.8" > NUL && set res=T|| set res=F if "%res%"=="T" ( echo OK ) else ( wget.exe --no-check-certificate https://storage.googleapis.com/vteam-pub-storage/vteam_modules/DOT_NET_RUNTIME/windowsdesktop-runtime-6.0.8-win-x86.zip -O windowsdesktop-runtime-6.0.8-win-x86.zip" unzip.exe -o windowsdesktop-runtime-6.0.8-win-x86.zip call windowsdesktop-runtime-6.0.8-win-x86.exe -s del windowsdesktop-runtime-6.0.8-win-x86.zip del windowsdesktop-runtime-6.0.8-win-x86.exe echo Fininsh ) pause