Intel and the PATH
I'm running into PATH size problems on my Windows 10, 64 bit system. Intel (of course) is a major contributor:
C:\Program Files (x86)\Intel\iCLS Client\; C:\Program Files\Intel\iCLS Client\; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT; C:\Program Files\Intel\Intel(R) Management Engine Components\IPT; C:\Program Files\Intel\WiFi\bin\; C:\Program Files\Common Files\Intel\WirelessCommon\
Can any of these be removed?
Can I kill off the 32 bit variants in Program Files (x86) and let the system find the tools C:\Program Files?
Finally, what is the safest way to experiment with this?
Officially speaking, Intel has stated that the PATH entries must remain intact, without specifying why. We can make guesses as to why, but it's probably an accurate statement.
If you're running out of room for your PATH entries (due to a default max size of 1920 bytes), there are two potential fixes:
Fix #1: Replace the long pathnames with their 8dot3 "short names."
8dot3 filenames are a throwback to earlier versions of DOS when filenames could only contain eight characters with a three-character extension (e.g., filename.bat). It creates a "hidden" directory entry for long file names. For example, C:\Program Files
is also accessible by going to C:\Progra~1
.
This allows you to reference the file paths using the shorter 8dot3 names rather than the long path name. This would turn something like:
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
into:
C:\PROGRA~2\Intel\INTEL(~1\DAL\
This technique reduced my path by 190 characters.
See the note for Windows 10 users below.
How do I get the "shortname" for a whole path?
Thanks to Sspoke, here's a great method: How can I find the short path of a Windows directory/file?
Fix #2: Replace repeated directory names with a shorter Environment Variable
Many times a path will contain common directory names. For example, here are the paths in your question:
C:\Program Files (x86)\Intel\iCLS Client\
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Intel\iCLS Client\
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
C:\Program Files\Common Files\Intel\WirelessCommon\
We can see that there are repeated folders. By creating a new, shorter environment variable to represent each folder, we can shorten this significantly using the following commands:
setx x86 "C:\Program Files (x86)" /M
setx x64 "C:\Program Files" /M
setx intel86 "C:\Program Files (x86)\Intel" /M
setx intel64 "C:\Program Files\Intel" /M
setx intelmec86 "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components" /M
setx intelmec64 "C:\Program Files\Intel\Intel(R) Management Engine Components" /M
And we change each of the path entries to the following:
%intel86%\iCLS Client\
%intelmec86%\DAL
%intelmec86%\IPT
%intel64%\WiFi\bin\
%intel64%\iCLS Client\
%intelmec64%\DAL
%intelmec64%\IPT
%x64%\Common Files\Intel\WirelessCommon\
443 bytes to 181 bytes, for a savings of 262 bytes.
Warning for both methods:
You may find that when you receive system or app updates that the original longer paths will be added back in alongside the 8dot3 versions. This is because the updates don't recognize their shorter versions and add them back in. You'll need to watch this and do manual cleanup when necessary.
Note for Windows 10 users:
This will not apply to most users.
8dot3 filename creation is enabled by default only on the primary C: drive in Windows 10. If you need to enable it on other drives, you can do so by running the following command in an elevated command prompt:
fsutil 8dot3name set D: 0
You will need to reboot after making this change!
The line turns on the creation of 8dot3 names for all new files on drive D:. This will not go back and add 8dot3 filenames for already existing files, so you'll need to run another command to actually create the 8dot3 names for the paths and/or files you need to access.
You will need to dig into fsutil file setshortname
to add 8dor3 names to the folders you need.