U盘装系统_分享U盘装系统教程_提供64位win11、win10、win7电脑系统及绿色软件下载

当前位置:首页 > 系统教程 > win10教程

Windows 10 上的环境变量的完整列表

时间:2022-03-14 来源: 点击:
手机扫码继续观看
Windows 10 上的环境变量的完整列表

  Windows 10 上的环境变量的完整列表

  使用这些环境变量快速浏览任何计算机上的 Windows 10 位置。

  Windows 10 上,环境变量是预定义的名称,表示操作系统中某些位置的路径,例如驱动器或特定文件或文件夹。

  环境变量在许多情况下都有用,但如果您是 IT 人员或正在修理其他人的计算机,它们尤其有用,因为您可以快速导航到某些位置,甚至不知道用户名或完整路径一个系统文件夹。

Windows 10 上的环境变量的完整列表

  例如C:UsersAppDataRoaming,您可以打开运行命令(Windows 键 + R),键入此变量%APPDATA%,然后按Enter 访问相同的路径,而不是浏览类似的路径。或者,您可以使用该%HOMEPATH%变量访问当前用户默认文件夹位置 — 操作系统存储桌面、文档、下载、OneDrive 等文件夹的位置。

  在本指南中,您将了解可在Windows 10上使用的最常见环境变量的列表。
 

Variable Windows 10
%ALLUSERSPROFILE% C:ProgramData
%APPDATA% C:Users{username}AppDataRoaming
%COMMONPROGRAMFILES% C:Program FilesCommon Files
%COMMONPROGRAMFILES(x86)% C:Program Files (x86)Common Files
%CommonProgramW6432% C:Program FilesCommon Files
%COMSPEC% C:WindowsSystem32cmd.exe
%HOMEDRIVE% C:
%HOMEPATH% C:Users{username}
%LOCALAPPDATA% C:Users{username}AppDataLocal
%LOGONSERVER% {domain_logon_server}
%PATH% C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem
%PathExt% .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc
%PROGRAMDATA% C:ProgramData
%PROGRAMFILES% C:Program Files
%ProgramW6432% C:Program Files
%PROGRAMFILES(X86)% C:Program Files (x86)
%PROMPT% $P$G
%SystemDrive% C:
%SystemRoot% C:Windows
%TEMP% C:Users{username}AppDataLocalTemp
%TMP% C:Users{username}AppDataLocalTemp
%USERDOMAIN% Userdomain associated with current user.
%USERDOMAIN_ROAMINGPROFILE% Userdomain associated with roaming profile.
%USERNAME% {username}
%USERPROFILE% C:Users{username}
%WINDIR% C:Windows
%PUBLIC% C:UsersPublic
%PSModulePath% %SystemRoot%system32WindowsPowerShellv1.0Modules
%OneDrive% C:Users{username}OneDrive
%DriverData% C:WindowsSystem32DriversDriverData
%CD% Outputs current directory path. (Command Prompt.)
%CMDCMDLINE% Outputs command line used to launch current Command Prompt session. (Command Prompt.)
%CMDEXTVERSION% Outputs the number of current command processor extensions. (Command Prompt.)
%COMPUTERNAME% Outputs the system name.
%DATE% Outputs current date. (Command Prompt.)
%TIME% Outputs time. (Command Prompt.)
%ERRORLEVEL% Outputs the number of defining exit status of previous command. (Command Prompt.)
%PROCESSOR_IDENTIFIER% Outputs processor identifier.
%PROCESSOR_LEVEL% Outputs processor level.
%PROCESSOR_REVISION% Outputs processor revision.
%NUMBER_OF_PROCESSORS% Outputs the number of physical and virtual cores.
%RANDOM% Outputs random number from 0 through 32767.
%OS% Windows_NT

  虽然您可以使用环境变量来快速访问其中的某些位置windows 10,您通常会在构建脚本或应用程序时使用这些变量。

  请记住,提到的一些变量不是特定于位置的,包括%COMPUTERNAME%, %PATHEXT%, %PROMPT%, %USERDOMAIN%, %USERNAME%。

上一篇:gpedit.msc找不到文件win10下的处理方法

下一篇:Windows10更新KB5011503安装失败错误代码0xc000021a

相关文章