Archive: AddToPath for "Program Archives"


AddToPath for "Program Archives"
  Hello everyone,

I work on a Windows system in spanish, but I am sure
in the english version the same problem would arise.
I want to check the location of a java dll, and use
this as a variable "$javaDllLocation".
Later, I want to do:


   Push $javaDllLocation

AddToPath
>
Unfortunately, my "$javaDllLocation" is:
"C:\Archivos de programa\Java\jre1.6.0_01\bin\client"

And hence (like with dir in a DOS prompt window), the
spaces in between "Archivos de programa" make AddToPath
think that the directory does not exist.
I have tried putting more parentesis around it, but it
doesn´t help. I prefer not to have some hardcoded
replacement of "Archivos de programa" with "ARCHIV~1"
in my code.

Has anybody ever dealt with this problem and come up with
some magic solution?
Many thanks,

Machiel

AddToPath doesn't care for spaces. Are the quotes actually included in $javaDllLocation? That could cause AddToPath to consider the path is invalid.


Many thanks, as a matter of fact there were some quotes
inside $javaDllLocation. Leaving them out resolved my
problem.
Thank you.