我需要使用批处理文件获取操作系统版本.我在网上看过很多例子,很多都使用类似这样的代码:
@echo off
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto ver_xp
if not exist %SystemRoot%\system32\systeminfo.exe goto warnthenexit
systeminfo | find "OS Name" > %TEMP%\osname.txt
FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i
echo %vers% | find "Windows 7" > nul
if %ERRORLEVEL% == 0 goto ver_7
echo %vers% | find "Windows Vista" > nul
if %ERRORLEVEL% == 0 goto ver_vista
goto warnthenexit
:ver_7
:Run Windows 7 specific commands here.
echo Windows 7
goto …Run Code Online (Sandbox Code Playgroud) 我正在开发一个必须在Windows和Linux上100%兼容的应用程序.在linux上我没有问题,但在Windows上我想出了这个消息:来自gi.repository import Gtk ImportError:没有名为gi的模块
我安装了pygobject,pygtkallinone,gtk ..我错过了什么?
如何使用LaTeX编写路径?我想要这样的东西:
C:\\Program Files\\My Program\\my file.txt
Run Code Online (Sandbox Code Playgroud)
我必须使用双斜杠,而不是单斜杠。