environment variable Path super long problem [go]

Source: Internet
Author: User

Symptom Replay:

Recently installed a Delphi control, as a result, after the installation of Delphi started after the failure to find the relevant file errors. In the beginning, I thought it was Delphi. The library path is not added, view, everything is OK. Start Delphi again, prompting that the XXX path has failed to insert into the PATH environment variable because the path variable exceeds the length limit. find the root cause:According to the Delphi prompts, open the Environment Variable Settings window, found that the path variable is indeed not short (many development tools installed, many need to set environment variables), because the control has a separate running environment, you need to write to the system PATH environment variable. But the name of the control is long and deadly. My classmate told me that the path is too long can be solved by using aliases, that is, create environment variables with other names, and use two "%" in path to refer to, then take a part of path path, create a new environment variable and reference in path. Start Delphi again, eh? Another file is missing. Repeated checks found that the environment variables that were just created have worked, but another path has been lost. Then open the CMD console, enter path, only to find that the value of the path variable has been truncated, the original method of using aliases is only a palliative. A single path variable can be inserted, and the length limit or existence of the variable value. Do I have to install each program into a short file path? Remedy for folk Remedies:When I thought about reloading the program to a short file path, I suddenly lit another lamp. Yes, the short name of the DOS8.3 format! (Haha, at that time I called out the first sentence is that you are too good ... )。 The so-called DOS8.3 format short filename is a file or directory name 8-byte main file name and a point plus 3-byte extension, in the non-DOS era of the system, although the file name can exceed this limit, but can still use the rule to manipulate the file name, even with the "~n" way we often see. So, since many folder names are the same length (such as MS SQL Server's Microsoft SQL Servers folder), then using the short file name in the DOS8.3 format to compress the path, you can shorten the path path of the role? But how do we get the short name of a file or directory? In fact, the system has provided us with this tool, very simple, in the CMD console run dir/n/x, then the current directory of the file name in a long/short two ways to display it, then do not need me to say it ... PostScript:Now that there are more and more programs that require PATH environment variables, path space is getting smaller, and I really don't know when this problem will be resolved. I just found a description of the path length limitation patch on the Microsoft Web site, but because the entire description of East-west is unthinkable, there is probably a patch that can extend path to 2046 bytes, but it has never been found. The method described in this paper is only a palliative, but it is a method before the PATH environment variable of length is not limited.

environment variable Path super long problem [go]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.