ABXZone Computer  Forums



Reply
 
Thread Tools Display Modes
Old 09-18-2015, 01:13 PM   #1
GWillakers
Registered User
 
Join Date: Sep 2006
Posts: 1,498
Often overlooked : Tune your Path variable

Guys, If it has been a long time since you wiped your drive and did a Fresh install of Windows, or

If you "Upgraded" a current install to Win 10, or have lingered on a Win 7 install for quite
some time, I urge you to examine your Path variable.

The "Path" variable determines the search order Windows uses when it tries to find a program, or
module somewhere outside the current directory.

It is important to have this environment variable "tuned" so that your system can find executables
quick and easily.

Installation programs do NOT always modify this all important variable correctly.
I was shocked to find my path contained 2 copies of 3 windows libraries, and they were often preceeded
by garbage game libraries.

******************************************************************************************
Please don't mess up... Done incorrectly this could prevent you from booting into windows
If you need to backup your system ... then do it...
I tend to just re-install when things go wrong.
******************************************************************************************


1. Open up a command prompt.

2. Type Path= {carraige return}

3. Examine the response.

A) In its most simplistic form the path variable will list the libraries separated by semicolons ;

Path=DirectoryA;libraryC;FolderG;

In the above example DirectoryA is searched first, followed by LibraryC and then FolderG

B) Your Path environment variable will look far more complicated, because they will specify
to full path to each individual libary.

So they won't specify "LibraryA"
but rather they will specify "C:\program files\Gollygees programs\LibraryA"

C) It is important to note that just the specific library specified will be searched

So if LibraryA had a subfolder called LibA
then the path variable Path=c:\LibraryG;C:\program files\Gollygees programs\LibraryA
only will search Two libraries.... LibraryG and LibraryA
specifically it will NOT search libA, the subfolder of LibraryA nor will it search
"Gollygees programs", the parent folder of LibaryA.

D) If you find a duplicate library, the copy specified last should be removed.
(Please examine the path carefully and make sure it is an exact duplicate.)

For example: Path=C:\windows;c:\program files\Nvidia;c:\windows;c:\windows\system32;

Removing the second "c:\windows;" in the above example will prevent the system from
searching the windows library twice before ever finding something in c:\windows\system32

E) Know that library search order is important.
If there are two modules of the same name in different directories,
The one that is found in the library specified first, will be the one executed.

Because of this, there is a tendency for Software writers to put their libraies at the
head of the chain. For instance if Sandog and Skully both write a program called
bestprogramintheworld.exe, and both coders were to put their libraries in the path
c:\program files\sandogLib;c:\windows;c\program files\skullylib;

Sandogs proram would get executed, while Skully's would be overridden by sandogs.

F) Keep your windows libraries closer to the front of the Path.
If you move a library further back in the chain, you must make sure that the library that
you are moving backward does not contain any modules that are similar to modules in
libraries that you are jumping over.

G) Control panel > system > advanced > environment variables > path
__________________
WorkStation ASUS P9X79 WS/BIOS 4802/Intel XEON E5-2687W SR0KG 3.1GHz (3.8GHz Turbo) 8 Core/16 Thread - 20MB L3/Intel Stock AC Cooler/Antec P180 case/Thermaltake Smart M 850W PSU/4x8GB Kingston KVR16E11/8I/ASUS GTX 970 STRIX graphics card/System drive Samsung 850 Pro 512GB/Data drives 2x Seagate 3TB ST3000DM001/1 TB Seagate/Windows 10 Pro (64-bit)

Internet/Gaming SuperMicro X9SRA BIOS 3.2/Intel XEON E5-1620 4C/8T (3.6 GHz -3.8GHz) 10MB cache/Noctua NH-U12S/PNY GTX 1070 8GB graphics card/Antec Sonata Case/Antec Earthwatts 650 PSU/4x8GB Kingston KVR16E11/8I/System drive Intel 520 Series 240GB,Samsung 850 Pro 512GB as Steam drive/Intel X25-M 80GB/Windows 10 Pro 64-bit
(Offline)   Reply With Quote

Advertisement [Remove Advertisement]
Old 09-18-2015, 02:08 PM   #2
JimTram
Seabees, USN (Retired)
 
JimTram's Avatar
 
Join Date: Oct 2003
Location: SoCal
Posts: 11,161
Re: Often overlooked : Tune your Path variable

Thanks. I checked. No Duplicates.
__________________
ASUS Z97-WS Intel i7-4790K air cooled by Noctua NH-U12S/NF-F12
Corsair Dominator Platinum CMD16GX3M2A1866C9
STRIX-GTX970-DC2OC-4GD5, Dell™ U2413
Samsung 850 Pro 1TB, WD Gold 1TB, ASUS DRW-24B1ST
Corsair 550D Case including 3x120 Corsair SP120 Fans,
Seasonic Prime Platinum 650 PSU
CyberPower CP1350PFCLCD
Ducky One White LED KB Cherry Blue, Logitech MX518
Sennheiser HD280 Pro
Win10 Pro 1703
iPhone 7+ 32GB, iPad 32GB WiFi, iPad 16GB WiFi
(Offline)   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com

© 2006 - 2016 ABXZone Forums | About ABX Zone Forums | Advertisers | Investors | Legal | A member of the Crowdgather Forum Community