What is the system variable for the windows folder

Is there any environment variable or Other format that the profile path is represented in Windows? I want to query in such a way that I should get the value "C:Documents and Settings (if windows X...

Is there any environment variable or Other format that the profile path is represented in Windows? I want to query in such a way that I should get the value «C:Documents and Settings (if windows XP or 2k3) or C:users (If vista or windows 7).

I dont want the current user name appended to the string, which I can get thru %USERPROFILE% variable.

asked Dec 21, 2010 at 21:21

svv's user avatar

2

It doesn’t exist. Instead, try %USERPROFILE%..

Warning: as @Mark suggests, this is not reliable because the user profile directory may really be any arbitrary location.

answered Dec 21, 2010 at 21:23

tenfour's user avatar

tenfourtenfour

35.8k14 gold badges80 silver badges142 bronze badges

4

On Vista+ you can use FOLDERID_UserProfiles to get C:Users (or whatever it may be in localized versions, etc). On XP and earlier you’ll pretty much have to go the CSIDL_COMMON_DESKTOPDIRECTORY route that will give you «C:Documents and SettingsAll UsersDesktop» and work your way back from there.

I think this settles it for Vista. For XP the solution is not perfect, but at least it won’t depend on the current user’s profile path. «All Users» will always exist, and I can’t think of a reason for it to be in a place other than the default.

answered Dec 21, 2010 at 22:43

martona's user avatar

martonamartona

5,6401 gold badge17 silver badges20 bronze badges

3

To the best of my knowledge no; but you can do a last instance of ‘/’ to find the parent directory of %USERPROFILE%

YakovL's user avatar

YakovL

7,19112 gold badges58 silver badges93 bronze badges

answered Dec 21, 2010 at 21:24

dko's user avatar

dkodko

8642 gold badges7 silver badges18 bronze badges

Yeah there actually is a way to get it to work:

%USERPROFILE%..

answered Feb 8, 2011 at 19:04

Sm1th's user avatar

Sm1thSm1th

191 bronze badge

1

I derived the batch and VBS methods (below), since I couldn’t find an equivalent batch or VBS method for this question anywhere else. If I shouldn’t add it to this thread (jscript), please add a comment on how/where it should go, and I will delete this answer and post as directed. :)

Batch (single line — no carriage return):

for /f "tokens=2*" %%f in ('reg query "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionProfileList" /v ProfilesDirectory ^|find /i "Profiles"') do @set ProfDir=%%g

VBScript:

' http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/registry/#ListRegFiles.htm

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" &_
strComputer & "rootdefault:StdRegProv")
strKeyPath = "SOFTWAREMicrosoftWindows NTCurrentVersionProfileList"
oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath,_
 arrValueNames, arrValueTypes

For i=0 To UBound(arrValueNames)
'    StdOut.WriteLine "File Name: " & arrValueNames(i) & " -- "
    oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,_
    arrValueNames(i),strValue
'    StdOut.WriteLine "Location: " & strValue
'    StdOut.WriteBlankLines(1)
    IF arrValueNames(i) = "ProfilesDirectory" THEN ProfileRoot= strValue
Next

wscript.echo("ProfileRoot=" & ProfileRoot)

Karl-Johan Sjögren's user avatar

answered Oct 7, 2012 at 10:57

Lizz's user avatar

LizzLizz

1,4345 gold badges25 silver badges51 bronze badges

0

On Windows 10, environment variables are predefined names representing the path to certain locations within the operating system, such as a drive or a particular file or folder.

Environment variables can be helpful in many scenarios, but they’re particularly useful if you’re an IT person or you’re fixing someone else’s computer, as you can quickly navigate to certain locations without even knowing the username or full path to a system folder.

For example, instead of browsing a path like “C:Users<UserName>AppDataRoaming,” you can open the Run command (Windows key + R), type this variable “%APPDATA%,” and press Enter to access the same path. Or you can use the “%HOMEPATH%” variable to access the current user default folders location — where the operating system stores the folders for Desktop, Documents, Downloads, OneDrive, etc.

In this guide, you’ll learn the list of the most common environment variables you can use on 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

Although you can use environment variables to access certain locations within Windows 10 quickly, you’ll typically use these variables when building a script or an application.

Keep in mind that some of the variables mentioned are not location-specific, including %COMPUTERNAME%, %PATHEXT%, %PROMPT%, %USERDOMAIN%, %USERNAME%.

While this guide is focused on Windows 10, it’s important to note that these variables will also work on Windows 8.1, Windows 7, Windows Vista, and Windows 11.

You can always view all the environment variables available on your device using the Get-ChildItem Env: | Sort Name PowerShell command.

We may earn commission for purchases using our links to help keep offering the free content. Privacy policy info.

All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.

Windows environment variables are commonly-used short-cut commands to open a folder path in Windows. Whether you want to locate specific folders or troubleshoot a bug, you can perform these tasks quickly by typing environment variables in the Run menu or Command Prompt. The following is a complete list of system and user environment variables in Windows 10 and Windows 11.

Content

  • What Are Windows Environment Variables?
  • How to Access Environment Variables in Windows
  • System vs. User Environment Variables
  • 1. %AppData% and %LocalAppData%
  • 2. %CD%
  • 3. %CommonProgramFiles%
  • 4. %COMSPEC%
  • 5. %Date% or %Time%
  • 6. %DriverData%
  • 7. %HomeDrive%
  • 8. %LogOnServer%
  • 9. %Number_Of_Processors%
  • 10. %OneDrive%
  • 11. %OS%
  • 12. %Path%
  • 13. %PathExt%
  • 14. %Processor_Architecture%
  • 15. %Processor_Identifier%
  • 16. %Processor_Level%
  • 17. %Processor_Revision%
  • 18. %ProgramData%
  • 19. %ProgramFiles%
  • 20. %Prompt%
  • 21. %PSModulePath%
  • 22. %Public%
  • 23. %Random%
  • 24. %SessionName%
  • 25. %SystemRoot%
  • 26. %Temp%
  • 27. %UserDomain%
  • 28. %UserProfile%
  • 29. %WinDir%
  • 30. %ZES_ENABLE_SYSMAN%
  • Frequently Asked Questions

Environment variables in Windows are commands that launch a folder path using a brief text string within percent sign characters (%). The “environment” here refers to the runtime in which a program is executed. In fact, the purpose of these commands is to impact various running processes on your computer.

Popular environment variable examples are “%AppData%,” “DriverData%,” “%temp%,” and “%WinDir%.” You may have used them in Run menu or Command Prompt without actually knowing that they’re called environment variables.

How to Access Environment Variables in Windows

It’s very easy to check all the environment variables present on a Windows device.

  1. Launch “View advanced system settings” using the Search button (magnifying glass) in Windows.
List Environment Variables View Advanced System Settings
  1. Alternatively, open Settings using  Win +  I, tap on “System -> About -> Advanced system settings.”
  2. Go to the “Advanced” tab and click “Environment Variables” under “Startup and Recovery.”
List Environment Variables Accessing Environment Variables Windows11

System vs. User Environment Variables

From the above menu option, you can see all the default/standard environment variables in one place. These are further classified into two categories:

  • User environment variables: these refer to user-centric file and folder paths. You can add shortcuts to any program you use, such as OneDrive, Microsoft Office, an Xbox PC app, and more and can freely edit and even delete the contents of the user environment variables.
  • System environment variables: these are the system-centric file and folder paths. While you can add new system environment variables (only if missing). Do not edit or delete the existing ones, as that may harm your device.
List Environment Variables What Are Environment Variables

1. %AppData% and %LocalAppData%

%AppData% points toward the AppData Roaming folder that is connected to your Windows user profile. Roaming means that your user login information can be transferred from one Windows device to another. In contrast, %LocalAppData% opens local user profile folders created on a Windows PC.

Uses

  • Locating and clearing unnecessary files, settings, and data accumulating in AppData folders.
  • Admin user taking back full ownership of important system and registry files from TrustedInstaller.
List Environment Variables Appdata Windows11

2. %CD%

CD (change directory) is a common text string used to switch directory paths in Windows Command prompt and PowerShell. Thus, the %CD% variable tells you the precise execution directory in which you are running your code.

Uses

  • After scrolling through several lines of text in Command Prompt, it’s easy to forget which is the current working directory. Typing echo %CD% gives you the current one.
  • If running multiple Command prompts at once, %CD% saves you the trouble of identifying the correct working directory.
List Environment Variables Cd Command Windows11

3. %CommonProgramFiles%

The %CommonProgramFiles% variable refers to a Windows directory named “Common Files.” It contains many types of 64-bit files and folders shared among various apps. Another related variable, %CommonProgramFiles(x86)%, does the same job but for x86-based (32-bit) programs and utilities only.

Uses

  • The variable opens a sub-directory where you can view all of the files shared by separately-installed programs.
  • For any program, you can access common components present in both 64-bit and 32-bit folders. These include frameworks, Services, and DLL files.
List Environment Variables Common Program Files Windows11

4. %COMSPEC%

%COMSPEC% or %ComSpec% is a shortcut text entry used in the Run menu to open the Command Prompt. It uniquely displays the entire Command Line path “C:WindowsSystem32Cmd.exe” on the window title.

Uses

  • Engage with the Command Line directly from any location on your PC.
  • If you’re running a computer with no hard disk, you can boot the device by launching CMD along with a configured RAM disk and USB drive.
List Environment Variables Comspec Windows11

5. %Date% or %Time%

As the name suggests, the environment variables %Date% and %Time% are used to display the current date and time on your device. A correct output will confirm that the latest date and time settings are in effect.

Uses

  • This variable is used to verify whether the current system date and time are correct.
  • Changing the current date and time according to “mm-dd-yy” and the “0:hh:mm:ss” 24-hour format.
List Environment Variables Date Time Windows11

6. %DriverData%

%DriverData% is a variable that refers to the DriverData folder on your Windows PC. It is located at “C:WindowsSystem32Drivers.” This is a central folder containing all of your driver information.

Uses

  • As the folder is accessible to “System Restore,” SFC, and other internal processes, its variable is very handy for locating possible errors.
  • While installing any new hardware, use the variable to check whether the DriverData folder has been affected.
List Environment Variables Driverdata Windows11

7. %HomeDrive%

The all-important C: drive is crucial to everything you do on your system. A command like %HomeDrive% (or %SystemDrive%) helps you open and view the location for further activity.

Uses

  • Access C: drive from anywhere on your PC.
  • Link with other environment variables, such as %CD% or %CommonProgramFiles%.
List Environment Variables Homedrive Windows11

8. %LogOnServer%

Every computer is connected to a a domain group or network of devices. %LogOnServer% displays the current Windows Logon server, which can be as simple as your computer name (below) or a corporate domain.

Uses

  • Quickly find out the Windows Logon server to which you’re authenticated.
  • Validate your user login to the correct Microsoft account.
List Environment Variables Logonserver Windows11

9. %Number_Of_Processors%

As the name suggests, %Number_Of_Processors% gives out the number of cores on your Windows CPU. The command returns a simple numeric value referring to the number of processor cores your device has.

Uses

  • Whether your PC has a dual (2), quad (4) or octa-core (8) processor configuration, using echo %Number_Of_Processors% is the fastest way to find out.
  • This is very useful when you want to learn whether you device will support certain games and applications that you want to run.
List Environment Variables Number Of Processors Windows11

10. %OneDrive%

The OneDrive folder contains all its essential applications, such as the Desktop, documents, and any files and folders synced with Microsoft’s Cloud servers. To open this folder, you can use its namesake environment variable, %OneDrive%.

Uses

  • Quickly access your Microsoft Cloud data from any location on your PC.
  • When using the OneDrive folder with Command Line, this variable will open the entire network path.
List Environment Variables Onedrive Folder Windows11

11. %OS%

Windows has been running its proprietary Windows NT operating system since 1993. Running an operating system-specific command like echo %OS% gives you a quick glimpse into your current operating system.

Uses

  • If you want to ensure that your current version of Windows is a valid copy (and not a pirated one), this variable gives you the confirmation.
List Environment Variables Os Winnt Windows11

12. %Path%

%Path% is one of the most common environment variables to be used on your Windows 10/11 device. When you run an echo %Path%, it gives you all the important Path files available on your PC.

Uses

  • View all your Windows Path files in one place. This includes the routine “C:WindowsSystem32” and other file locations for PowerShell, WindowsApps and OpenSSH.
  • You can utilize these Path file locations with other commands.
List Environment Variables Path Windows11 1

13. %PathExt%

While installing native and third-party apps in Windows, you come across many files with extensions, such as .COM, .EXE, .BAT (Batch files), .VBS, .VBE, and so forth. %PathExt% makes you aware of all the file extension types you need to watch out for in the %Path% variable.

Uses

  • Know all the file extensions that can be executed from Command Prompt.
  • Start a program or script in Command line without specifying the suffix, such as .EXE.
List Environment Variables Pathext Command Windows11 1

14. %Processor_Architecture%

What kind of microprocessor does your Windows device contain? With a variable echo %Processor_Architecture%, you can easily tell whether you’re using Intel or AMD (or any other CPU), and whether it’s 64 or 32-bit.

Uses

  • Knowing the exact architecture your Windows device uses is helpful when you install compatible games and applications.
List Environment Variables Processor Architecture Windows11

15. %Processor_Identifier%

The echo %Processor_Identifier% variable goes deeper into CPU-specific information, including processor family and model series, whether it’s Genuine Intel or AMD, and what level of design change a processor was built into. (It’s called processor “stepping.”)

Uses

  • Advanced applications, such as creating Windows batch scripts or testing hardware failure.
  • Testing the hardware compatibility of external components, such as motherboard, RAM etc., with your Windows device.
List Environment Variables Processor Identifier Windows11

16. %Processor_Level%

In analyzing chip architecture, echo %Processor_Level% displays the processor level showing the model number of the CPU installed in your device. It is expressed numerically as 3,4, 5 (for x86) to 6 for (x64) computers.

Uses

  • Validating that you have the right processor capabilities on your processor as advertised by the chip-maker.
List Environment Variables Processor Level Windows11

17. %Processor_Revision%

While each processor is being designed, it goes through a series of design iterations. echo %Processor_Revision% tells you the revision number of the installed CPU. In other words, it lets you know how advanced a processor is.

Uses

  • When buying a new laptop, you can use this variable to make an informed decision in choosing a chipset.
List Environment Variables Processor Revision Windows11

18. %ProgramData%

Much like Program Files, the Program Data folder is used by Windows to install standard applications but does not require higher level Administrator privileges. Using %ProgramData% gives you easy access to this folder.

Uses

  • Malware authors often try to attack the ProgramData folder, as tampering with its files can affect installed apps. Always keeping it hidden is important.
  • As an Admin user, you should stay on top of any changes in the folder. Use “System Restore” if you notice any errors.
List Environment Variables Programdata Windows11

19. %ProgramFiles%

The %ProgramFiles% and %ProgramFiles(86)% variables directly launch the respective Program Files and Program Files for 32-bit application folders. This allows you to view all your installed file components.

Uses

  • Add, edit and delete any program files directly in this section.
  • Are you unable to access the File Explorer for any reason? If so, %ProgramFiles% from the Run menu gives you quick access to this folder.
List Environment Variables Program Files Windows11

20. %Prompt%

The Prompt variable, %Prompt%, gives an indication of the current Command Prompt, validating whether your Command Prompt executable, cmd.exe is present in the correct folder path. It is written as echo %Prompt% and returns specific values as shown below.

Uses

  • The output Prompt text can be returned. It consists of various characters, where $P refers to a current drive and path, and $G means equal to or greater than. Thus, if you get an output such as $P$G, it means your cmd.exe is in the right folder.
List Environment Variables Prompt Command Windows11

21. %PSModulePath%

The Windows PowerShell script uses various modules located in different parts of a Windows PC. The %PSModulePath% variable used as echo %PSModulePath% displays all of the various locations for it, such as Program Files or System32.

Uses

  • PowerShell modules contain various components, such as Cmdlets, Providers, workflows, and aliases. These are frequently used in coding activity in sync with the main PowerShell window.
  • You can access them centrally with a %PSModulePath% variable without having to search for them individually.
List Environment Variables Psmodulepath Windows11

22. %Public%

The variable %Public% when typed in the Run menu reveals the public users folder located at C:UsersPublic. It stores all the documents, downloads, music, and pictures attached to the publicly accessible folder.

Uses

  • Getting a birds-eye view of all user accounts registered in a Windows device.
  • Sharing data with others via your computer or network.
List Environment Variables Public Command Windows11

23. %Random%

The Command Prompt has its own variable, %Random%, which is used to generate a random number between 0 to 32767. To use it, you need to type echo %Random%, which will generate a number, such as 21907 shown here.

Uses

  • Random numbers are often used in Windows batch scripts for testing purposes.
  • If you are facing issues with numeric display on your device, test whether the random numbers are displaying correctly in Command line.
List Environment Variables Randomnumber Windows11

24. %SessionName%

If you are frequently using remote desktops, it may become hard to tell whether the current session being hosted is local to the device. This problem can be addressed using echo %SessionName%.

Uses

  • If the SessionName is shown as “Console,” you know that the session is local to your device.
  • Similarly, if you see an Output such as “RDP-Tcp#,” it will inform you whether you’re using a Remote Desktop session.
List Environment Variables Sessionname Windows11

25. %SystemRoot%

The System Root of your folder, C:Windows, contains many utilities that are integral to your device performance. They can all be centrally accessed from the %SystemRoot% variable in theRun menu. Also check %WinDir%..

Uses

  • Accessing Control Panel applications as they’re directly linked to System Root folder.
  • The System Root contains utilities such as “Fonts.” You can directly open these folder paths from Run menu and operate on them using Command Prompt.
List Environment Variables Systemroot Windows11

26. %Temp%

One of the best known applications of environment variables, the temporary files folders can be accessed using %Temp% or %Tmp% in Run menu.

Uses

  • Instead of remembering the entire path “C:UsersAppDataLocalTemp,” you can simply open the temporary files folder with a simple and easy to remember command.
  • Delete as many temporary files as you want to free up space on your device and improve PC performance.
List Environment Variables Temp Folder Windows11

27. %UserDomain%

Every desktop device is marked by a user domain. To know where your current user is being hosted, you can check the domain with an environment variable called %UserDomain%. It has to run with an echo command as echo %UserDomain%.

Uses

  • Mapping the current PC user’s desktop session with its username.
  • Setting up Group user policies for several users.
List Environment Variables Userdomain Windows11

28. %UserProfile%

If there are multiple usernames registered on a Windows device, it becomes difficult to tell which user is connected to a current desktop profile. Using a Run menu variable, such as %UserProfile%, will get you a complete view.

Uses

  • Accessing and managing multiple user profiles registered on a Windows PC.
  • Deleting and editing the desktop, documents, and downloads for multiple user profiles (something only Admin users can do).
List Environment Variables Userprofiles Windows11

29. %WinDir%

The %WinDir% is similar to %SystemRoot%, in that both point to the C:Windows location on your PC. However, unlike the latter, WinDir can be used to launch standard Windows system calls to open a folder or get a specific output. It is also more commonly used in the latest Windows devices.

Uses

  • Centrally access error reports pertaining to system faults, as all of them link to the %WinDir% variable and its location C:Windows.
  • The WinDir folder is closely linked to the administrator account and 64-bit applications.
List Environment Variables Windir Windows11

30. %ZES_ENABLE_SYSMAN%

Sysman means System Resource Management library. This covers many things in Windows 11/10, such as power management of various system components. To enable this setting, you need to input echo %ZES_ENABLE_SYSMAN%.

Uses

  • If the Output value returns itself as 1, then it means that the default SysMan settings for the CPU have been initialized.
  • On some Windows devices, you can use echo %ZES_ENABLE_SYSMAN_LOW_POWER% to ensure low power settings. Thus, both Sysman commands can be used to turn the current low power settings On or Off.
List Environment Variables Zes Enable Sysman Windows11

Frequently Asked Questions

How can I resolve Windows environment variables that are not recognized?

If one or more of your Windows environment variables are not being recognized, it is possible that their settings are missing on your device. Go to “View Advanced System Settings” from the search menu and open Environment Variables, then add those missing environment variables one by one. Close the window and try resolving the issue.

How can I export and import environment variables in Windows?

To export or import environment variables in Windows, you need to open the Registry Editor from the Run menu (regedit.exe). You will find environment variables here under “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment” and “HKEY_CURRENT_USEREnvironment.” You can export and import the new environment variables in this section’s right panel.

How do I refresh environment variables in Windows?

In the Command Prompt window, using the “cls” command will clear the screen and refresh all the environment variables for you. But to do that properly, you need to first set the variables at their respective locations. See this detailed guide on how to set variables correctly.

Image credit: Pixabay All screenshots by Sayak Boral

Sayak Boral

Sayak Boral

Sayak Boral is a technology writer with over eleven years of experience working in different industries including semiconductors, IoT, enterprise IT, telecommunications OSS/BSS, and network security. He has been writing for MakeTechEasier on a wide range of technical topics including Windows, Android, Internet, Hardware Guides, Browsers, Software Tools, and Product Reviews.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Любая операционная система нуждается в способе хранения различных настроек и прочей информации для нормальной работы. Для этого практически все операционные системы используют специальные переменные – переменные среды (environment variables).

Примечание! Переменная – это область памяти, хранящая те или иные данные, используемые программой.

В современных версиях Windows они бывают двух типов:

  • пользовательские, хранящие параметры для конкретных пользователей;
  • системные, хранящие параметры для всей системы.

Можно привести несколько примеров переменных сред:

  • SystemDrive – обозначает диск системы (обычно это С:);
  • SystemRoot – хранит папку системы (обычно это C:WINDOWS);
  • PATH – обозначает «рабочие» папки, содержащие системные приложения.

Приложения, расположенные в папках указанных в PATH, можно вызывать без предварительного выбора каталога.

Зачем редактировать переменные?

Как правило, эти переменные не приходится редактировать вручную, поскольку они используются в параметрах, которые не нужно менять регулярно. Вручную редактировать эти данные приходится при ручной установке утилит и при устранении конфликтов между автоматически добавляемыми значениями.

Внимание! Некорректное изменение может привести к нарушению в работе тех или иных приложений или системы в целом.

Способы редактирования и создания

Переменные среды в Windows 7, 8, 10 можно легко редактировать самостоятельно. Это делается различными способами – через Свойства компьютера, с помощью командной строки и путем редактирования реестра.

Через Свойства компьютера

Проще всего отредактировать эти значения с помощью графического интерфейса. Для этого следует в Проводнике щелкнуть правой кнопкой мыши по иконке компьютера («Этот компьютер» в Windows 10, «Мой компьютер» в Windows 7) и выбрать «Свойства».Свойства компьютера

Далее следует открыть «Дополнительные параметры системы», а в появившемся окне «Свойства системы» — «Переменные среды».Переменные среды

После этого появится окно, позволяющее с помощью удобного графического интерфейса просматривать, добавлять, редактировать и удалять нужные элементы.Список переменных окружений

Интерфейс создания и изменения предельно прост – достаточно указать имя и значения. Предусмотрены диалоги для удобства выбора каталогов и файлов.новая переменная

Через командную строку

Чтобы начать редактирование этим способом, необходимо открыть командную строку в режиме администратора. Для этого необходимо нажать Win+R, набрать в поле «cmd» и нажать Ctrl+Shift+Enter.окно Выполнить

Для работы с переменными окружениями в командной строке  Windows 7, 8, 10 предусмотрена утилита setx.

Для создания или изменения значения переменной среды пользователя данная утилита имеет следующий синтаксис:

setx new_var hello_world

Здесь new_var – название, a hello_world – значение.

Для создания или изменения системной переменной следует добавить параметр /M, например:

setx new_sys_var hello_eternity /M

Примечание! В случае, если название и/или значение содержат хотя бы один пробел, нужно использовать кавычки:

setx “new var”  “hello_world”

Для очистки значения можно просто указать кавычки в качестве значения:

setx new_var “”

При этом утилита setx не может удалять переменные полностью. Это можно сделать путем «прямого» удаления соответствующей записи в реестре с помощью утилиты REG. Для пользовательской переменной команда будет выглядеть так:

REG delete HKCUEnvironment /F /V new_var

Для системной она будет такой:

REG delete "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /F /V new_sys_var

Замечание по поводу кавычек актуально и для этих команд.

Через реестр

Для управления этими данными через реестр достаточно встроенного редактора regedit. Чтобы его открыть следует нажать Win+R, ввести в поле «regedit» и нажать OK. Для управления пользовательскими параметрами следует открыть ветку HKEY_CURRENT_USEREnvironment, для управления системными — HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment.Редактор реестра

Как узнать список переменных сред

Иногда нужно просто узнать список этих значений. Для этого достаточно набрать set в командной строке. Также их можно сохранить в текстовом файле. Для этого необходимо перейти в папку сохранения файлов по своему усмотрению, например ввести в консоли:

cd %HOMEPATH%

Тут используется переменная среды HOMEPATH. Далее достаточно такой команды:

set > variables.txt

Тут можно изменить название файла на свое усмотрение, но расширение .txt лучше оставить.

Также эти данные можно экспортировать с помощью редактора реестра. Для этого необходимо открыть соответствующую ветку реестра указанную ранее и выбрать ФайлЭкспорт. В поле «Тип файла» следует выбрать «Текстовые файлы (*.txt)». Далее можно выбрать нужную папку, ввести название и сохранить данные.Экспорт файлов

Внимание! Не рекомендуется таким образом архивировать переменные среды путем создание файла типа *.reg.

Introduction

The Windows Fundamentals 1 room at TryHackMe is the first in a three-part series on Windows and covers a lot of basics about the Windows OS. Topics include an introduction to the Windows OS, the Windows GUI, file systems, system folders, user accounts and permissions, Settings, Control Panel, and the Task Manager.

A lot of this content might be review if you have experience with Windows systems, but the room does a good job of keeping it high-level enough that you can cover it as quickly as you want.

About This Walkthrough

In this walkthrough, I try to provide helpful information about the topics covered by the room. I don’t just give you the answers or copy what is already on TryHackMe. Sometimes I will also review a topic that isn’t covered in the TryHackMe room because I feel that it may be a useful supplement.

I try to prevent spoilers by making finding the solutions a manual action, similar to how you might watch a video of a walkthrough; they can be found in the walkthrough but require an intentional action to obtain. Always try to work as hard as you can through every problem and only use the solutions as a last resort.

This room can be found at: https://tryhackme.com/room/windowsfundamentals1xbx

Task 1 – Introduction to Windows

Chances are you’ve worked with a Windows machine before; about 76% of desktop and laptop machines use the Windows OS. Windows is popular because it’s intuitive and easy to work with and has wide support for most desktop/laptop software and games.

On TryHackMe, the Windows virtual machine (VM) is launched using the green ‘Start Machine’ button at the top of the Task. This is a different machine than the Linux AttackBox that can be launched at the top of the page using the blue ‘Start AttackBox button’.

Despite this, I did still get the familiar “Use the AttackBox to attack machines you start on tasks” message while the Windows VM loaded.

Question 1

Read above and start the virtual machine.

Answer:

No answer needed

Task 2 – Windows Editions

This Task covers a brief history of the Windows OS beginning with the first version in 1985. I highly recommend this article by the Guardian for an in-depth and entertaining review of Windows systems through Windows 10.

One of the biggest issues with Windows has been managing the process of releasing new versions. Some versions, like Vista or Windows 8, have had short lifecycles, while others lasted much longer.

Currently (in Sep 2021), Windows 10 is the most popular system for desktop computers and comes in two flavors; Home and Pro. Windows 11 is set to be released in October 2021, and Microsoft will continue to support Windows 10 until October 2025.

Question 1

What encryption can you enable on Pro that you can’t enable in Home?

Walkthrough:

You can see a comparison of Windows versions on Microsoft’s website. Here’s a table that should tell you what you need to know:

This type of encryption will protect your device and data if your computer is lost or stolen.

Answer:

(Highlight below to see the answer):

BitLocker

Task 3 – The Desktop

Unlike Linux, Windows has always been closely associated with a graphical user interface (GUI).

Having a GUI makes an operating system more accessible, and helps enable widespread adoption of an OS or software.

In Windows, the primary GUI is the Desktop, which is an aggregated view of two folders; a public desktop folder at C:UsersPublicDesktop and a user-specific desktop at %userprofile%Desktop.

The desktop can be customized, personalized, and organized in different ways by right clicking and selecting either the ‘Display Settings’ or ‘Personalize’ options.

The bottom of the desktop has a number of helpful features:

Start Menu: Provides menu-based access to common software and utilities.

Search Box: Allows you to search for applications and utilities. Useful for quickly opening an application.

Task View: Toggles a view showing all open applications in a ‘birds-eye view’ display. Can be enabled or disabled by right-clicking in the taskbar and selecting/deselecting ‘Show Task View’ option.

Taskbar: Allows you to quickly move between open applications. There are lots of customization options that are accessible by right clicking in the taskbar.

Toolbars: Shows additional options for quick navigation, divided into individual ‘toolbars’. For example, the ‘Desktop’ toolbar will allow you to navigate anything in the Desktop while working with a different app.

Notification Area: Shows the date, time, volume, battery, and other icons to control important system settings.

Question 1

Which selection will hide/disable the Search box?

Walkthrough:

The search box can be hidden, accessed via an icon, or fully shown via the ‘search’ menu when you right-click the taskbar:

Answer:

Hidden

Question 2

Which selection will hide/disable the Task View button?

Walkthrough:

This option can also be accessed by right-clicking the taskbar:

Answer:

Show Task View button

Question 3

Besides Clock, Volume, and Network, what other icon is visible in the Notification Area?

Walkthrough:

This icon corresponds to new notifications, but the name is not immediately transparent. You can find the answer here.

Answer:

Action Center

Task 4 – The File System

In order for data to be stored and retrieved, there must be a standardized way of doing so. File systems represent different standardized ways of storing and retrieving data, and different file systems have evolved over time.

Originally, Windows systems used the File Allocation Table (FAT) system. The original FAT system was called FAT8 and used 8-bit table elements. This limited file size, which tended to grow over time, so new versions of FAT like FAT16 and FAT32 were developed.

However the FAT system still had many limitations and was eventually overtaken by the New Technology File System (NTFS), which was standard on the Windows New Technology (Windows NT) OS flavors. Most significantly, NTFS is a journaling file system, which means that damaged folders or files can be repaired using information from a log file.

Most Windows computers today use NTFS, which has other benefits compared with FAT systems. File sizes can be greater than 4GB, permissions for individual files and folders can be specified, and files and folders can be compressed to save space.

We saw that Linux systems allow permission settings of read, write, and execute for specific users, groups, and all users.

In contrast, permissions allowed by NTFS include full control, modify, read and execute, list contents, read, and write.

NTFS also features Alternate Data Streams (ADS). ADS allows files to contain more than one data stream. This basically means that the file can contain more than just the ‘contents’ of the file itself; other data can also be associated with the file. This can be used for file metadata but can also be exploited by hackers.

Question 1

What is the meaning of NTFS?

Walkthrough:

The answer can be found in the task write-up above (or you can Google it).

Answer:

New Technology File System

Task 5 – The WindowsSystem32 Folders

We can navigate to the folders and files that comprise the operating system itself. The primary folder that holds the operating system is called the Windows folder, and is usually located at C:Windows.

However, the Windows OS doesn’t have to be stored at that location. Environment variables are used to store information about the OS environment. The system environment variable for the Windows directory is %windir%. This can be typed in to the file explorer and you will be taken to the Windows directory.

Inside the Windows directory there is a folder called System32, which holds files that are critical to the operating system. Always take care not to accidentally perform an unwanted action in this folder, as this could disable the OS.

Question 1

What is the system variable for the Windows folder?

Walkthrough:

See the writeup above.

Answer:

%windir%

Task 6 – User Accounts, Profiles, and Permissions

There are two types of accounts on Windows systems: Administrator and Standard User.

Administrators can make changes to the system, add/delete users, and modify groups.

Standard users can only make changes to the part of the filesystem that they have been allocated, and can’t make system changes, add/remove users, etc.

As an administrator, you can add, edit, or delete other users using the ‘Other Users’ window in Settings. Start typing ‘other users’ into the search box next to the Start Menu, and select ‘Other Users’.

When logged in, as an Administrator, we see an option to add a new user at the top, using the ‘Add someone else to this PC’. If we’ll left-click a listed user, we will also see options to change that user’s account type (i.e. from Standard to Administrator) as well as to delete the account.

New users get a profile, which includes folders for their desktop, documents, downloads, music, and pictures.

We can manage users using Local User and Group Management, which can be accessed by right-clicking the Start Menu, selecting ‘Run’, and typing ‘lusrmgr.msc’

Inside lusmgr there are two folders; one for users and the other for groups. A user assigned to a group inherits permissions from that group.

Question 1

What is the name of the other user account?

Walkthrough:

Access lusrmgr and double click on the users folder. You will see a list of user accounts:

There is one user account that sticks out. What is its name?

Answer:

tryhackmebilly

Question 2

What groups is this user a member of?

Walkthrough:

Access this user account’s properties by double-clicking or right-clicking and selecting ‘Properties’.

Navigate to the ‘Member Of’ tab:

Inside the main box is a list of all groups that the user belongs to.

Answer:

Remote Desktop Users,Users

Question 3

What built-in account is for guest access to the computer?

Walkthrough:

Take a look at the user accounts again (you can use the screenshot above). One of the accounts has the description: “Built-in account for guest access to the computer/domain”. Which user account is this?

Answer:

Guest

Question 4

What is the account status?

Walkthrough:

Access the ‘Properties’ of the guest account. On the ‘General’ tab, there are accounts for disabling and locking the account out:

Answer:

Account is disabled

Task 7 – User Account Control

While most Windows home users tend to work while being logged in as an administrator, this degree of privilege is risky and seldom used in enterprise settings. Consider the use of the ‘sudo’ command in Linux, where we can stay logged in as a non-administrator and then use the command in order to perform tasks requiring higher privileges.

Windows has a similar baked in functionality called User Account Control (UAC). When a user with admin privileges logs in to the system, by default these privileges are disabled and accessed only when the user tells the system to do so. Instead, the user is prompted and, depending on the setup, required to enter an admin password in order to proceed.

Question 1

What does UAC mean?

Answer:

User Account Control

Task 8 – Settings and The Control Panel

There are two primary places to make changes on a Windows system: the Settings menu and the Control Panel.

In general, most changes now take place in the Settings menu, while the Control Panel is reserved for more complex changes. While navigating the system, you may find yourself working in both, or going from the Settings menu into the Control Panel when trying to make a change by accessing a window.

Most of the time, the easiest way to navigate all of the different menus and windows is just to use the search bar next to the start menu. If you know the name of the menu you want to access, great. But even if you don’t, typing in a keyword will often get you close to where you need to be.

Question 1

In the Control Panel, change the view to Small icons. What is the last setting in the Control Panel view?

Walkthrough:

In the search bar (next to the Start menu), type in ‘Control Panel’ and access it.

On the top-right side (to the right of the ‘Adjust your computer’s settings’), you will see a ‘View by’ drop-down menu:

Click on the menu and select ‘Small icons’.

The Control Panel will change to reflect the new setting. To answer the question, find the last setting:

Note that this is using the deployed machine and may not be same for your own home computer. My home computer has the Windows Mobility Center enabled, so that’s what shows up as the last setting.

Answer:

Windows Defender Firewall

Task 9 – Task Manager

The Task Manager is one of the most frequently used utilities on Windows. It allows you to see all running processes and perform actions on those processes, including ending them.

You can also see what processes are using up CPU or memory and thus optimize a system or diagnose a problem.

There are different ways to access the Task Manager. My favorite is by pressing ‘ctrl+shift+esc’, which will give you direct access. You can also access it via the ‘ctrl+alt+del’ menu or by right-clicking on the Taskbar and selecting the ‘Task Manager’ option.

Question 1

What is the keyboard shortcut to open Task Manager?

Walkthrough:

There are three options that I mentioned above, but only one provides direct access.

Answer:

Ctrl+Shift+Esc

Task 10 – Conclusion

This room provided an overview of the Windows OS. THM has many rooms dedicated to Windows systems, so let’s continue our journey in ‘Windows Fundamentals 2’. If you’re on the Pre-Security Learning Path, there’s only two more rooms left!

Question 1

Read above and terminate the Windows machine you deployed in this room.

Walkthrough:

The machine can be terminated by selecting the ‘Power’ button.

Answer:

No answer needed

Conclusion

This room covers a lot of Windows OS basics. There’s a good chance that much of the content is review, especially if you’ve had any IT or computer experience. One of the things to take away from this room is the basic functionality of Windows as an OS, compared with Linux which was already covered. You can see that at a fundamental level, both OS’s are trying to manage similar things; functionality, security, customizability, permissions, etc.

Overall, I enjoyed this room and found it to be a great review. A huge thanks to tryhackme, and heavenraiza for putting this room together!

Содержание

  • Переменные среды Windows
    • Переменные PATH и PATHEXT
    • Создание переменных среды
    • Заключение
  • Вопросы и ответы

Переменные среды в Windows 10
Переменная среды (переменная окружения) – это короткая ссылка на какой-либо объект в системе. С помощью таких сокращений, например, можно создавать универсальные пути для приложений, которые будут работать на любых ПК, независимо от имен пользователей и других параметров.

Получить информацию о существующих переменных можно в свойствах системы. Для этого кликаем по ярлыку Компьютера на рабочем столе правой кнопкой мыши и выбираем соответствующий пункт.

Переход к свойствам операционной системы с рабочего стола Windows 10

Переходим в «Дополнительные параметры».

Переход к дополнительным параметрам системы в ОС Windows 10

В открывшемся окне с вкладкой «Дополнительно» нажимаем кнопку, указанную на скриншоте ниже.

Переход к обзору переменных среды в ОС Windows 10

Здесь мы видим два блока. Первый содержит пользовательские переменные, а второй системные.

Раздел настройки переменных среды в Windows 10

Если требуется просмотреть весь перечень, запускаем «Командную строку» от имени администратора и выполняем команду (вводим и нажимаем ENTER).

set > %homepath%desktopset.txt

Создание текстового документа со списком переменных среды из Командной строки Windows 10

Подробнее: Как открыть «Командную строку» в Windows 10

На рабочем столе появится файл с названием «set.txt», в котором будут указаны все переменные окружения, имеющиеся в системе.

Текстовый документ со списком переменных среды Windows 10

Lumpics.ru

Все их можно использовать в консоли или скриптах для запуска программ или поиска объектов, заключив имя в знаки процента. Например, в команде выше вместо пути

C:UsersИмя_пользователя

мы использовали

%homepath%

Примечание: регистр при написании переменных не важен. Path=path=PATH

Переменные PATH и PATHEXT

Если с обычными переменными все понятно (одна ссылка – одно значение), то эти две стоят особняком. При детальном рассмотрении видно, что они ссылаются сразу на несколько объектов. Давайте разберемся, как это работает.

Переменные среды PATH и PATHEXT в Windows 10

«PATH» позволяет запускать исполняемые файлы и скрипты, «лежащие» в определенных каталогах, без указания их точного местоположения. Например, если ввести в «Командную строку»

explorer.exe

система осуществит поиск по папкам, указанным в значении переменной, найдет и запустит соответствующую программу. Этим можно воспользоваться в своих целях двумя способами:

  • Поместить необходимый файл в одну из указанных директорий. Полный список можно получить, выделив переменную и нажав «Изменить».
    Переход к изменению переменной среды PATH в ОС Windows 10
  • Создать свою папку в любом месте и прописать путь к ней. Для этого (после создания директории на диске) жмем «Создать», вводим адрес и ОК.

    Добавление значения переменной PATH в Windows 10

    %SYSTEMROOT% определяет путь до папки «Windows» независимо от буквы диска.

    Затем нажимаем ОК в окнах «Переменные среды» и «Свойства системы».

    Применение настроек переменных окружения в Windows 10

Для применения настроек, возможно, придется перезапустить «Проводник». Сделать это быстро можно так:

Открываем «Командную строку» и пишем команду

taskkill /F /IM explorer.exe
Завершение работы Проводника из Командной строки в Windows 10

Все папки и «Панель задач» исчезнут. Далее снова запускаем «Проводник».

explorer

Перезапуск Проводника из Командной строки в Windows 10

Еще один момент: если вы работали с «Командной строкой», ее также следует перезапустить, то есть консоль не будет «знать», что настройки изменились. Это же касается и фреймворков, в которых вы отлаживаете свой код. Также можно перезагрузить компьютер или выйти и снова зайти в систему.

Теперь все файлы, помещенные в «C:Script» можно будет открывать (запускать), введя только их название.

Запуск файла с помощью переменной среды PATH в Windows 10

«PATHEXT», в свою очередь, дает возможность не указывать даже расширение файла, если оно прописано в ее значениях.

Значения переменной среды PATHEXT в Windows 10

Принцип работы следующий: система перебирает расширения по очереди, пока не будет найден соответствующий объект, причем делает это в директориях, указанных в «PATH».

Запуск приложения с помощью переменной PATHEXT в Windows 10

Создание переменных среды

Создаются переменные просто:

  1. Нажимаем кнопку «Создать». Сделать это можно как в пользовательском разделе, так и в системном.
    Переход к созданию переменной среды в Windows 10
  2. Вводим имя, например, «desktop». Обратите внимание на то, чтобы такое название еще не было использовано (просмотрите списки).

    Присвоение имени новой переменной среды в Windows 10

  3. В поле «Значение» указываем путь до папки «Рабочий стол».

    C:UsersИмя_пользователяDesktop
    Присвоение значения новой переменной среды в Windows 10

  4. Нажимаем ОК. Повторяем это действие во всех открытых окнах (см. выше).

    Применение настроек при создании новой переменной среды в Windows 10

  5. Перезапускаем «Проводник» и консоль или целиком систему.
  6. Готово, новая переменная создана, увидеть ее можно в соответствующем списке.

    Расположение новой пользовательской переменной среды в списке в Windows 10

Для примера переделаем команду, которую мы использовали для получения списка (самая первая в статье). Теперь нам вместо

set > %homepath%desktopset.txt

потребуется ввести только

set > %desktop%set.txt

Заключение

Использование переменных окружения позволяет значительно сэкономить время при написании скриптов или взаимодействии с системной консолью. Еще одним плюсом является оптимизация создаваемого кода. Имейте в виду, что созданные вами переменные отсутствуют на других компьютерах, и сценарии (скрипты, приложения) с их использованием работать не будут, поэтому перед тем, как передавать файлы другому пользователю, необходимо уведомить его об этом и предложить создать соответствующий элемент в своей системе.

В Windows 10  переменные среды — это предварительно определенные имена, представляющие путь к определенным местам в операционной системе, например к диску, конкретному файлу или папке.

Переменные среды могут быть полезны в ряде сценариев, они особенно полезны, если вы являетесь специалистом по ИТ или чините чужой компьютер, поскольку вы можете быстро перемещаться в определенные места, даже не зная имени пользователя или полного пути к системной папке.

Например, вместо перехода по следующему пути C:Users<UserName>AppDataRoaming можно открыть команду «Выполнить» (клавиша Windows + R), ввести %APPDATA% и нажать клавишу Enter  для доступа к тому же пути. Или вы можете использовать переменную %HOMEPATH% для доступа к местоположению папок по умолчанию для текущего пользователя — где операционная система хранит папки рабочего стола, документов, загрузок, OneDrive и т. Д.

HOMEPATH

Переменные среды по умолчанию в Windows 10

VARIABLE WINDOWS 10
%ALLUSERSPROFILE% C:ProgramData
%APPDATA% C:Users{имя пользователя}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{имя пользователя}
%LOCALAPPDATA% C:Users{имя пользователя}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{имя пользователя}AppDataLocalTemp
%TMP% C:Users{имя пользователя}AppDataLocalTemp
%USERDOMAIN% Пользовательский домен, связанный с текущим пользователем.
%USERDOMAIN_ROAMINGPROFILE% Пользовательский домен, связанный с перемещаемым профилем.
%USERNAME% {имя пользователя}
%USERPROFILE% C:Users{имя пользователя}
%WINDIR% C:Windows
%PUBLIC% C:UsersPublic
%PSModulePath% %SystemRoot%system32WindowsPowerShellv1.0Modules
%OneDrive% C:Users{имя пользователя}OneDrive
%DriverData% C:WindowsSystem32DriversDriverData
%CD% Выводит текущий путь к каталогу. (Командная строка.)
%CMDCMDLINE% Выводит командную строку, используемую для запуска текущего сеанса командной строки. (Командная строка.)
%CMDEXTVERSION% Выводит количество текущих расширений командного процессора. (Командная строка.
%COMPUTERNAME% Выводит имя системы.
%DATE% Выводит текущую дату. (Командная строка.)
%TIME% Время выхода. (Командная строка.)
%ERRORLEVEL% Выводит число определяющих статус выхода предыдущей команды. (Командная строка.)
%PROCESSOR_IDENTIFIER% Идентификатор процессора
%PROCESSOR_LEVEL% Outputs processor level.
%PROCESSOR_REVISION% Вывод ревизии процессора.
%NUMBER_OF_PROCESSORS% Выводит количество физических и виртуальных ядер.
%RANDOM% Выводит случайное число от 0 до 32767.
%OS% Windows_NT

Хотя вы можете использовать переменные среды для быстрого доступа к определенным местам в Windows 10, вы, как правило, будете использовать эти переменные при создании сценария или приложения.

APPDATA

Помните, что некоторые из упомянутых переменных не зависят от местоположения, в том числе  % COMPUTERNAME%, %PATHEXT%, %PROMPT%, %USERDOMAIN%, %USERNAME%.

Хотя это руководство ориентировано на Windows 10, важно отметить, что эти переменные также будут работать в Windows 11, Windows 8.x, Windows 7 и Windows Vista.

Понравилась статья? Поделить с друзьями:
  • What is the name of the service associated with windows update
  • What is better linux or windows
  • What is a room but has no doors or windows
  • What hash format are modern windows login passwords stored in
  • What can you see from the windows where you live