如果是通过命令行安装了.NET检查 [英] Checking if .NET is installed from the command line
本文介绍了如果是通过命令行安装了.NET检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么类似于Windows下,可以让我知道,如果是通过命令行安装了.NET?
$ Java的版本
$红宝石--version
$蟒蛇--version
解决方案
您使用的是什么操作系统和命令shell?
对于Windows批处理文件
如果不存在%WINDIR%\ Microsoft.Net \框架\ V1.0.3705 \ mscorlib.dll中
如果不存在%WINDIR%\ Microsoft.Net \框架\ V1.1.4322 \ mscorlib.dll中
如果不存在%WINDIR%\ Microsoft.Net \框架\ V2.0.50727 \ mscorlib.dll中
使用Windows PowerShell的距离
如果(测试路径(连接路径$ ENV:WINDIRMicrosoft.Net \框架\ V2.0.50727 \ mscorlib.dll中))){
Is there anything similar to the following in Windows that will let me know if .NET is installed from the command line?
$ java -version
$ ruby --version
$ python --version
解决方案
What OS and command shell are you using?
With Windows from a batch file
if EXIST %WINDIR%\Microsoft.Net\Framework\v1.0.3705\mscorlib.dll
if EXIST %WINDIR%\Microsoft.Net\Framework\v1.1.4322\mscorlib.dll
if EXIST %WINDIR%\Microsoft.Net\Framework\v2.0.50727\mscorlib.dll
With Windows from PowerShell
if (test-path (join-path $env:windir "Microsoft.Net\Framework\v2.0.50727\mscorlib.dll"))){
这篇关于如果是通过命令行安装了.NET检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文