It is also possible to use the command-line executable setx. Any file that is in a directory listed in the PATH variable can be found or opened by direct reference to the name of the file without having to specify the drive and directories where it is located. This is very handy in scripting and in other ways. For instance, the name of an executable file that is in a directory listed in the PATH variable can be entered into Start-Run to open certain applications more on this subject here.
The file is sol. Normally this entire string would have to be used in order to reference the Solitaire game. Because its directory is listed in the PATH variable, however, it is sufficient to reference just the file name sol. As is explained on other pages , file extensions tell Windows what it is supposed to do with a file.
Certain file extensions indicate that the file is executable ; that is, the file opens a program or does something. The extension. EXE is the most common.
Thus the filename sol. If files have the same name but different extensions, the operating system searches in the following order of precedence:. BAT, and. Existing variables can be edited or deleted and new ones can be added in several ways.
For temporary changes, the command " Set" can be used in scripts or in a command window. Note that the there must be no spaces on either side of the "equals" sign. Changes made with "Set" disappear when the command window is closed, thus rendering this method fairly uninteresting for the average PC user. A more useful application of "Set" is to list the environment variables. Open a command window and enter "set" to see what the variables are on your system.
Those who wish can consult this Microsoft article for more details about "Set". A more permanent way to manage environment variables is provided in the System Properties dialog box. In the box that opens, click the "Advanced" tab to obtain the dialog box shown below.
Next, click the button "Environment Variables". The figure below shows the "Environment Variables" dialog box that opens next. It lists two kinds of variable- those that apply only to the current user and those that apply to the whole system.
You can simply scroll down the lists to see what is on your system or you can edit the lists. To create a new variable, use the "New" button. There are also buttons for editing and for deleting variables. I try to reorder it, unsuccessfully! Thanks Tom! I agree, but this format will make more sense to Brazilians people. Office Office Exchange Server. Not an IT pro? Resources for IT Professionals. Sign in. United States English. Ask a question.
Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. The Official Scripting Guys Forum! If your answer is "yes," you know what to do. Dive in and help somebody! Share This Post. All Rights Reserved. Expand to full path to the All Users profile directory which contains resources such as shortcuts for Start Menu and Desktop for all users.
0コメント