Windows Vista Path is being truncated - help!

  • Thread starter Thread starter WendyAlia@gmail.com
  • Start date Start date
W

WendyAlia@gmail.com

Guest
I've racked the internet looking for a solution to this - for which
there must be one, I'm sure...

My system path is being truncated - it's reproduced below - the
truncation is at the *X* point in the string - and I can't figure out
how to increase the environment size to allow the extra characters
that I need. I've even modified the COMSPEC variable as reproduced
below - to no avail.

Does anyone know how to configure Vista to have more available
environment space?

Wendy

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:
\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files
\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual
Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio
8\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 8\VC
\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK
\v2.0\bin;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program
Files\Microsoft Visual Studio 8\VC\VCPackages;C:\Program Files\Common
Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio
Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools
\binn\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program
Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft
Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\AccuRev
\bin;C:\Program Files\Macrovision\IS12\System;C:\bin;C:\Program Files
\Macrovision\IS*X* 12 StandaloneBuild;C:\Program Files\QuickTime
\QTSystem\

%SystemRoot%\system32\cmd.exe /e:5120
 
Re: Path is being truncated - help!

On Wed, 26 Sep 2007 09:55:40 -0700, WendyAlia@gmail.com wrote:

>%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:
>\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files
>\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual
>Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio
>8\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 8\VC
>\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK
>\v2.0\bin;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program
>Files\Microsoft Visual Studio 8\VC\VCPackages;C:\Program Files\Common
>Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio
>Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools
>\binn\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program
>Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL
>Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft
>Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\AccuRev
>\bin;C:\Program Files\Macrovision\IS12\System;C:\bin;C:\Program Files
>\Macrovision\IS*X* 12 StandaloneBuild;C:\Program Files\QuickTime
>\QTSystem\


Make a backup of the above and stick it somewhere safe. Then

replace C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;
with
C:\Program Files\Micros~2;
or
C:\Program Files\Microsoft Visual Studio 8\

then delete
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin;
C:\Program Files\Microsoft Visual Studio 8\VC\BIN;
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin;
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Private Assemblies\;
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;

replace
C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;
with
C:\Program Files\Microsoft SQL Server
or
C:\Program Files\Micros~1

then delete
C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;

replace
C:\Program Files\Common Files\Roxio Shared\DLLShared\;
with
C:\Program Files\Common Files\
or
C:\Program Files\Common~1

then delete
C:\Program Files\Common Files\Roxio Shared\DLLShared\;
C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;

replace
C:\Program Files\Macrovision\IS*X* 12 StandaloneBuild;
with
C:\Program Files\Macrovision\
or
C:\Program Files\Macrov~1

Just my opinion, but path is more or less just an aid to search. ie: when a
program is given the file name to find without a direct path it looks in path
1st. Then goes off on it's own searching the drive if it can't find what it's
looking for in the path.

looking in the root vs an exact folder should work just fine with possibly some
slow down when loading things.

ie: %system root%/system32; should work for everything under it such as the
hosts file in drivers/etc.. And it does.

If things start failing just tweak the above. If Path were absolutely
necessary, there's no way 1024 bytes would be enough. It just helps find things
faster. All those EXACT folders shouldn't be necessary unless they're filled
with hundreds of files, and folders.

You'll see I used C:\Program Files\Micros~2; twice
C:\Program Files\Micros~2;
and
C:\Program Files\Micros~1;
If you have many
microsoft folders in your C:\Program Files\ folder, you'll have to get a sorted
directory list 1st. IE: Mine

This is how DOS actually see's my microsoft folders truncated to 8.3

>my 8.3 : Volume in drive C is HP
>my 8.3 : Volume Serial Number is 04CD-62F8
>my 8.3 :
>my 8.3 : Directory of C:\Program Files
>my 8.3 :
>my 8.3 : 06/23/2007 08:53 PM <DIR> MI3AA1~1 Microsoft ActiveSync
>my 8.3 : 05/08/2007 05:40 PM <DIR> MICROS~1.2 Microsoft CAPICOM 2.1.0.2
>my 8.3 : 07/06/2007 02:07 PM <DIR> MIF408~1 Microsoft Encarta
>my 8.3 : 11/02/2006 08:37 AM <DIR> MICROS~1 Microsoft Games
>my 8.3 : 06/22/2007 03:49 AM <DIR> MI0A1E~1 Microsoft Location Finder
>my 8.3 : 06/24/2007 04:10 PM <DIR> MICROS~3 Microsoft Office
>my 8.3 : 09/21/2007 06:55 PM <DIR> MI2578~1 Microsoft SDKs
>my 8.3 : 09/22/2007 01:52 PM <DIR> MI2020~1 Microsoft Silverlight
>my 8.3 : 09/21/2007 08:30 PM <DIR> MI6841~1 Microsoft SQL Server
>my 8.3 : 09/22/2007 10:28 AM <DIR> MI29AE~1 Microsoft SQL Server Compact Edition
>my 8.3 : 06/22/2007 03:50 AM <DIR> MIFAE3~1 Microsoft Streets & Trips
>my 8.3 : 09/22/2007 10:28 AM <DIR> MI364D~1 Microsoft Synchronization Services
>my 8.3 : 09/15/2007 03:19 PM <DIR> MICROS~4 Microsoft Visual Studio
>my 8.3 : 09/23/2007 05:26 PM <DIR> MID05A~1 Microsoft Visual Studio 8
>my 8.3 : 09/22/2007 10:43 AM <DIR> MICROS~1.0 Microsoft Visual Studio 9.0
>my 8.3 : 09/22/2007 10:36 AM <DIR> MI15E2~1 Microsoft Web Designer Tools
>my 8.3 : 06/24/2007 04:11 PM <DIR> MICROS~2 Microsoft Works
>my 8.3 : 09/21/2007 08:27 PM <DIR> MICROS~1.NET Microsoft.NET
>my 8.3 : 1 File(s) 0 bytes
>my 8.3 : 18 Dir(s) 166,032,846,848 bytes free

I was going to suggest you get an 8.3 list from your system. But those numbers
can change if a folder is renamed, removed, added etc..
ie:
C:\Program Files\Micros~9 could be either
C:\Program Files\Micros~8 or C:\Program Files\Micro~10 if I changed the number
of microsoft folders in the C:\Program Files\ folder.

You can probably use the 8.3 names. Long as you remember to change your path if
you do something with a microsoft named folder.
--
more pix @ http://members.toast.net/cbminfo/index.html
 
Re: Path is being truncated - help!

<WendyAlia@gmail.com> wrote ...
> My system path is being truncated - it's reproduced below - the
> truncation is at the *X* point in the string - and I can't figure out


Hi Wendy

The maximum length for the PATH variable is 1023 chars (you'll notice in
your string below, the "X" is at the 1023rd char). This limit applies to the
sum of the system PATH, and the PATH in the user profile.

On XP and Vista, the maximum size of an individual environment variable is
8,192 bytes. However the PATH is still limited to 1,023 chars. I'm pretty
sure this limit was imposed for compatibility reasons. The Windows kernel
itself would have no problem dealing with a far longer PATH. But 16-bit and
other older applications will crash, if they call GetEnvironmentVariable and
get back more than 1024 bytes (since they only allocate a max 1,024 car
buffer; a larger value returened would be a buffer overrun). To maintain a
stable platform for these legacy applications, the restriction on PATH stays
in place.

The available total environment space, to hold all variables, is permanently
fixed at 64K in XP, 2003 and Vista. There is no way to increase the
environment space. But - as above, your problem isn't limited environment
space, you've hit the length limit for PATH.

NT-based operating systems (eg NT, 2000, XP, Server 2003, and Vista) do not
use the COMSPEC command to determine the environment size. That command was
only used in DOS-based platforms, like MS-DOS, Windows 3.1 and Windows 9x.
Run "cmd /?" to see a list of valid paramters for CMD.EXE (the /e: is a
boolean and turns on or off, the command extensions).

Windows applications can locate programs by looking up the "App Paths" key
in the Registry. The PATH variable is mainly useful for command-line
applications. If you don't need to launch an application from the command
line, you can usually remove that app's directory from the PATH. Many
applications add their directories to the PATH, unnecessarily.

For example: I run Visual Studio every day; but I don't actually leave any
VS directories on my PATH. If I want to run the Visual Studio Command line
tools, I open a Command Prompt from the Start, Visual Studio, Visual Studio
Tools menu. That has the right PATH configured, plus several other handy
environment variables (INCLUDE, etc).

Hope it helps,
--
Andrew McLaren
amclar (at) optusnet dot com dot au
 
Re: Path is being truncated - help!

Andrew!

Yes, thanks a lot for that. I rearranged the entries in my registry
to get around the problem, but it was frustrating not knowing what was
going on.

Thanks for the full explanation.

Wendy

On Sep 26, 7:41 pm, "Andrew McLaren" <and...@fakeaddress.com> wrote:
> <WendyA...@gmail.com> wrote ...
>
> > My system path is being truncated - it's reproduced below - the
> > truncation is at the *X* point in the string - and I can't figure out

>
> HiWendy
>
> The maximum length for the PATH variable is 1023 chars (you'll notice in
> your string below, the "X" is at the 1023rd char). This limit applies to the
> sum of the system PATH, and the PATH in the user profile.
>
> On XP and Vista, the maximum size of an individual environment variable is
> 8,192 bytes. However the PATH is still limited to 1,023 chars. I'm pretty
> sure this limit was imposed for compatibility reasons. The Windows kernel
> itself would have no problem dealing with a far longer PATH. But 16-bit and
> other older applications will crash, if they call GetEnvironmentVariable and
> get back more than 1024 bytes (since they only allocate a max 1,024 car
> buffer; a larger value returened would be a buffer overrun). To maintain a
> stable platform for these legacy applications, the restriction on PATH stays
> in place.
>
> The available total environment space, to hold all variables, is permanently
> fixed at 64K in XP, 2003 and Vista. There is no way to increase the
> environment space. But - as above, your problem isn't limited environment
> space, you've hit the length limit for PATH.
>
> NT-based operating systems (eg NT, 2000, XP, Server 2003, and Vista) do not
> use the COMSPEC command to determine the environment size. That command was
> only used in DOS-based platforms, like MS-DOS, Windows 3.1 and Windows 9x.
> Run "cmd /?" to see a list of valid paramters for CMD.EXE (the /e: is a
> boolean and turns on or off, the command extensions).
>
> Windows applications can locate programs by looking up the "App Paths" key
> in the Registry. The PATH variable is mainly useful for command-line
> applications. If you don't need to launch an application from the command
> line, you can usually remove that app's directory from the PATH. Many
> applications add their directories to the PATH, unnecessarily.
>
> For example: I run Visual Studio every day; but I don't actually leave any
> VS directories on my PATH. If I want to run the Visual Studio Command line
> tools, I open a Command Prompt from the Start, Visual Studio, Visual Studio
> Tools menu. That has the right PATH configured, plus several other handy
> environment variables (INCLUDE, etc).
>
> Hope it helps,
> --
> Andrew McLaren
> amclar (at) optusnet dot com dot au
 
Back
Top