• GooCalSync.bat will create ever-longer PATH

    By Karl Freburger 1 decade ago

    The GooCalSync.bat file does this:



    set path=%gcsnotespath%;%gcsjvmbinpath%;%path%



    but does not restore the PATh to its previous value. On windows, if you're running GooCalSync from a command windows, this results in an ever-increasing PATH, such as this:



    c:\notes;c:\program files\java\jdk1.6.0_12\bin

    ;c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\program files\java\j

    dk1.6.0_12\bin;c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\progra

    m files\java\jdk1.6.0_12\bin;c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\n

    otes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\program files\java\jdk1.6

    .0_12\bin;c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\program fil

    es\java\jdk1.6.0_12\bin;c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;

    c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\program files\java\jdk1.6.0_12

    \bin;c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\program files\ja

    va\jdk1.6.0_12\bin;c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\pr

    ogram files\java\jdk1.6.0_12\bin;c:\notes;c:\program files\java\jdk1.6.0_12\bin;

    c:\notes;c:\program files\java\jdk1.6.0_12\bin;c:\notes;c:\program files\java\jd

    k1.6.0_12\bin



    One solution is to save the value of PATH before changing it, then restore it at the end of the bat file. There may be other solutions; I'm not enough of a Windows expert to know.