[Intro]
Windows and %environment% variables
Have you ever wondered why when you type "%TMP%" it opens the TEMP files folder of your profile or when you type "%OS%" the word "Windows_NT" pops up instead of what you typed?
This is all done thanks to environment variables. An environment variable is a short reference to some object in the system or a necessary text that carries some information.
There are two kinds of variables: local and system variables. Local %variables% act only within your account. System %variables%, as you may guess, have their effect on the whole system.
Variable begins and ends with a percent sign (%) For example: %TMP%, %WINDIR%, %HOMEDRIVE%
You can also use the CMD to get a list of of all the variables that are stored in the system. Different programs can also create their own variables.
You can also set your own variables and they will work.
As I already showed you, variables of local type will only work for the account that created the variable (in this case, Daniel's account). In another account (Alex, for example), such variables will not work.
And system type variables already have system-wide action and it doesn't matter from which account the variable was created.
The system variables are located and stored in the Windows registry at [HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] The local ones will be located in your register user's directory: [HKEY_USERS\{account-code}\Environment]
But what happens if we delete all the variables? That's what we'll find out :)
The effect will be available only after rebooting the system.
At first it looks like nothing happened, but it only seems that way :) Do you see the explorer icon on the taskbar? The shortcut to it is broken.
Also, almost no programs open in the Start menu, although their icons are present and it just makes it feel like everything is fine.
But if you open the list of all the programs, it immediately becomes clear that something something is not right here.
If you create a program shortcut from Start menu on the desktop, it won't work either. But why?
And this is all because most of the shortcuts of standard Windows programs, the beginning of the path is specified as "%windir%", and this is already a variable. But the variables have been removed and the system now has no idea what they are at all.
You will also say goodbye to programs that require UAC for start (User Account Control)
But simple programs like calc.exe (the shortcut of which does not run in the Start menu) working perfectly
Action Center will also not work. You don't need it, though :)
And some of the personalization settings will not be available.
The system will also begin to report that there is no sound. Although it is actually there.
In general, variables are very important in the system. At least for the proper functioning of shortcuts, some programs, UAC system, MMC and other small system software.
Creating and activating new users with broken variables works But then it starts exactly the same way.
Well, that's all I wanted to show you. I hope it was interesting! Until next time!
Subscribe. The names of all musical compositions are indicated in the description!