win10 by the% AppData%, path extended out to explore the environment variables, and modify the registry of the blood of some lessons

To form good habits, point a praise walk

Have questions, please private letters, comments, and I will see to reply


  • I'm looking at PicGo when configuring manual, to see such a sentence: PicGo configuration files by default in Windows systems % APPDATA% \ picgo \ data.json

Then know that % APPDATA% is the Windows set of variables , pointing to the application data stored in the default position

  • I am in the process of learning coupled with a variety of programming languages found often need to configure the environment variable path , although successful, according to a step by step tutorial on network configuration, but it felt like a marionette,

Then know that the environment variable path role: when the system requirements to run a program and it does not tell the full path where, in addition to the system to find this program in the current directory, but also to the path specified in the path to look for. Users by setting environment variables to better run the process.

So the initiation of the inquiry win10 system variables, environment variables, user variables, system variables (can be called environmental variables) in the end What the hell? It must clearly give the whole


Before reading Friendly reminder:

  • With a step by step into my inquiry, I found the registry (core database window system) in which plays an important role in the Super
    my article Deep, I believe you will read it

  • Article to take care of them sprouting new, so understanding the environment variable window, the registry window opens the way older drivers can voluntarily skipped a directory, the directory two

  • To configure the environment variable path are interested, you can read the directory three gameplay path of

  • Want in-depth understanding of environment variables and registry in the end what friendship explorers, please read the catalog four

  • Finally, the last, if you have the user through the registry file into the folder under the C drive to the D drive idea, try to refrain from casual to follow tutorial on the network, to bring you a directory of five I sacrifice my user currently logged on and stay lessons in! ! !

A directory: Open the Registry

Keyboard press win + R & lt , open the operating window, the input in the input box regedit

Mouse click OK or press Enter, the Registry Editor will open

There are five open registry entries, we have an environment variable on the computer in the registry has a corresponding entry

Catalog II: Environment Variables Open

image-20200308214111535

  1. If you have a desktop icon,

Right this computer , click on Properties

  1. If you do not see the icon on your computer desktop,

Keyboard while pressing win + E , open File Explorer , right-click this computer , click on Properties

Both methods can open the system window, click Advanced System Settings

Open the System Properties window, select Advanced and click Environment Variables

Environment Variables window will open

Contents Three: take your intuitive feelings Environment Variables

For example, the environment variable **% AppData% **,

Keyboard press win + R & lt , open the operating window, enter **% AppData% **

You can directly enter the path it points to: C: \ Users \ username \ AppData \ Roaming (default is the location of the application data is stored)

% XXX% of play

Variables window into the environment

If the computer only you use (only one user name)

Whether it is for a user variable, or modifications to the system variables, no difference for you,

Now I'm in the top half of the window user variables, a new an environment variable,

Then click OK, the following figure shows, on your behalf new operation successful

OK, OK,

Then you keyboard while pressing win + r, open the Run window, type% zgh%,

Click OK or Enter to directly open the D: \ zgh a folder

path play

In the Environment Variables window, the user variables, system variables have Path path (when the system is required to run a program and it does not tell the full path where, in addition to the system to find this program in the current directory, but also to the path specified the path to go. users run the process by setting environment variables to better.)

Which of the Path operations are the same (now with Windows is PC, and generally only one user)

When the system is required to run a program and it does not tell the full path where, in addition to the system to find this program in the current directory, we must also specify the path to the path to find. Users by setting environment variables to better run the process.

How to understand the Bible? I, for example with a program

There tim program on my desktop shortcut, usually just click the icon to launch it
Here Insert Picture Description

Why shortcuts can start tim, let's right, property, shortcuts , you can see the path it points to: tim installation path \ Bin \ QQScLauncher.exe

Shortcuts actually calls tim startup program (QQScLauncher.exe)

.exe files in Windows executable file

Shortcut links the executable file

In fact, Path and shortcuts are similar, but the Path is global in the computer

If I add in the path tim installation path \ Bin \ QQScLauncher.exe program where the parent directory: tim installation path \ Bin

Double-click to open any Path, or select any click Edit Path

OK, OK, OK

The remaining procedures can start in its file path tim, we can be open at a random directory cmd , enter QQScLauncher.exe or QQScLauncher , you can start the tim

When we enter a command in a DOS window, it will be the first in the Path in order to find you if there is

  • If there is, it will run the executable file directly
  • If not, to find in the current directory
    and the current directory can be found running, if the current directory can not be found, the error will be

Directory four: the environment variable with the corresponding registry, we come to know them

  • Remind 1: %XXX%The XXX is not case-sensitive, for example, %SYSTEMROOT%with %SystemRoot%the same meaning
  • Remind 2: appear in the following path in user name , namely: the user login name, it is the first time you turn on the computer enter a user name (and every time you turn on your login name will appear, such as my user name is Zhang Guohao)
  • Remind 3: Environment variables mentioned below just installed win10 system to your computer when there are environmental variables (including environment variables you do not use the computer in the process, their own configuration, software programs installed self-configured environment variables )

Environment Variables window

  • The upper half of the user variable corresponds to the registry entry is: the HKEY_CURRENT_USER \ Environment

  • The lower half is divided into system variables corresponding to the registry entry is: HKEY_LOCAL_MACHINE \ the SYSTEM \ ControlSet001 \ Control \ the Session Manager \ Environment

User Variables

Environment Variables window:

The corresponding window in the registry HKEY_CURRENT_USER \ Environment :

They both influence each other,

Change one, the other will change at the same time

We can see that,

  • Path environment variable configuration **% USERPROFILE% \ AppData \ Local \ Microsoft \ WindowsApps ** actual path is:% USERPROFILE% \ AppData \ Local \ Microsoft \ WindowsApps
  • % TEMP%,% TMP% of the actual path is:% USERPROFILE% \ AppData \ Local \ Temp

% TEMP%,% TMP% default temporary directories for applications that are currently available to the user login used. Some applications require TEMP, while other applications require TMP.

Supplementary:% USERPROFILE% environment variable is defined in the registry

System Variables

Environment Variables window:

image-20200308222522139

The corresponding window registry HKEY_LOCAL_MACHINE \ the SYSTEM \ ControlSet001 \ Control \ the Session Manager \ Environment :

image-20200308222258185

We can see that,

  • % ComSpec% of the actual point is:% SystemRoot% \ system32 \ cmd.exe

    What we usually open the console cmd

  • Path is configured with five environment variables, which are based on % SystemRoot% at the beginning

  • PSModulePath configured with two environment variables to a % ProgramFiles% , and another based on a % SystemRoot% at the beginning

  • % TEMP%,% TMP% of the actual path is:% USERPROFILE% \ AppData \ Local \ Temp

  • % windir% of the actual path is:% SystemRoot%

Value appeared **% SystemRoot%,% USERPROFILE% ,% ProgramFiles% **, so what do these things?

Defined in the registry environment variable (used)

  • % HOMEDRIVE%,% SystemDrive% corresponding default: C: \ (C plate)

When we open the C drive, you will see the following five folders

  • % USERPROFILE% corresponding default: C: \ Users \ username (user folder, the current location of the user's profile)
  • % SystemRoot% corresponding default: C: \ Windows (Windows folder where the operating system directory)
  • % ProgramFiles% default corresponds to: C: \ Program Files (Program Files folder)
  • % ProgramFiles (x86)% corresponding default: C: \ Program Files (x86) (Program Files (x86) folder)
  • % ProgramData%,% ALLUSERSPROFILE% corresponding default: C: \ ProgramData (Program the Data folder, all "user profile" position)

and also:

  • % AppData% corresponding default:% USERPROFILE% \ AppData \ Roaming
    default location for storing the application data in the event

Contents Five: Friendly reminder (bloody lessons)

Open my user folder: C: \ Users \ zgh

That user Users, zgh I currently logged on user name
Here Insert Picture Description
check the top of the Explorer view , check the hidden items back, you can see the hidden AppData folder

For these folders,

MicrosoftEdgeBackups folder, I looked at, he is an empty folder
I in Microsoft community benefactor Gray says so:

Microsoft Edge will back up your favorites and read a list of store every day.

Before, Win10 encountered a problem that the favorites during the update process will magically disappear. This is Microsoft to help prevent this approach.

This folder leave it there

You can directly move several folders

"3D objects, video, pictures, documents, downloads, music, desktop, saved games, contacts, links, favorites, search" folder ,

Windows allows a user to move (can move to the operation, or right - Properties - Position - modified address input box )
Here Insert Picture Description

AppData folder,% USERPROFILE%

However, for the AppData folder, copy, move operations are not successful

Spent nearly two days time, I saw three places from the network method almost always modify the registry. However, these methods are basically very old, Yuyan unknown, basically you dare to dare to change computer problem

Lists the following three lightning protection zones:

(1) open the registry, navigate to Computer \ HKEY_CURRENT_USER \ Software \ Microsoft \ Windows
Here Insert Picture Description
\ CurrentVersion \ Explorer \ User Shell Folders can see, AppData or folder path that many have with the % USERPROFILE% related

% USERPROFILE% because this path is rather special, it is not an ordinary folder, but the user profile root directory of files, all user-specific data, including file and registry information are stored here.

Because of this particularity, each user profile location is not saved in the user's own registry, but stored in the system registry.

(2) open the registry, navigate to Computer \ HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Shell Folders

Here Insert Picture Description
The Shell Folders in turn differ from the User Shell Folder in,% USERPROFILE% turned into a real path

Will teach you to modify the network (1), all% USERPROFILE% and its actual path (2) to see, modifications to the D drive to go; however modified, comes with the basic Windows applications are not open, and the rest of the software you download will have a little less of a problem

(3) open the registry, navigate to Computer \ HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ ProfileList

Here Insert Picture Description
Here on the record of all accounts in the system configuration file path, find the item you are currently under the SID corresponding to the user, where "ProfileImagePath" string value is the % USERPROFILE% of the value of the

But after ProfileImagePath Qianwanqianwan modification shall not be ah, modify, restart your computer, you will find the user originally used did not, and advance good backup the registry can not be imported into the registry! ! !

Published 156 original articles · won praise 434 · views 210 000 +

Guess you like

Origin blog.csdn.net/Zhangguohao666/article/details/104733940