有什么类似于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"))){