
windows 10 上的环境变量的完整列表
使用这些环境变量快速浏览任何计算机上的 windows 10 位置。
windows 10 上,环境变量是预定义的名称,表示操作系统中某些位置的路径,例如驱动器或特定文件或文件夹。
环境变量在许多情况下都有用,但如果您是 it 人员或正在修理其他人的计算机,它们尤其有用,因为您可以快速导航到某些位置,甚至不知道用户名或完整路径一个系统文件夹。
例如c:\Users\\Appdata\Roaming,您可以打开运行命令(windows 键 + R),键入此变量%APPdAtA%,然后按enter 访问相同的路径,而不是浏览类似的路径。
或者,您可以使用该%homePAth%变量访问当前用户默认文件夹位置 — 操作系统存储桌面、文档、下载、onedrive 等文件夹的位置。
在本指南中,您将了解可在windows 10上使用的最常见环境变量的列表。
Variablewindows 10%ALLUseRsPRoFiLe%c:\Programdata%APPdAtA%c:\Users\{username}\Appdata\Roaming%commonPRogRAmFiLes%c:\Program Files\common Files%commonPRogRAmFiLes(x86)%c:\Program Files (x86)\common Files%commonProgramw6432%c:\Program Files\common Files%comsPec%c:\windows\system32\cmd.exe%homedRiVe%c:\%homePAth%c:\Users\{username}%LocALAPPdAtA%c:\Users\{username}\Appdata\Local%LogonseRVeR%\\{domain_logon_server}%PAth%c:\windows\system32;c:\windows;c:\windows\system32\wbem%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}\Appdata\Local\temp%tmP%c:\Users\{username}\Appdata\Local\temp%UseRdomAin%Userdomain associated with current user.%UseRdomAin_RoAmingPRoFiLe%Userdomain associated with roaming profile.%UseRnAme%{username}%UseRPRoFiLe%c:\Users\{username}%windiR%c:\windows%PUBLic%c:\Users\Public%PsmodulePath%%systemRoot%\system32\windowsPowershell\v1.0\modules\%onedrive%c:\Users\{username}\onedrive%driverdata%c:\windows\system32\drivers\driverdata%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%。
原文地址:https://www.weidianyuedu.com/content/4020051374041.html