Tweak for Windows gnucash.bat files

Daniel Harding dharding at quikmail.org
Wed Dec 19 10:12:39 EST 2007


Hello,

I noticed a minor issue with the gnucash.bat files used to launch 
GnuCash on Windows (both the one that gets created by the installer and 
the one that gets generated by the build).  In particular, they prepend 
several paths to the PATH environment variable.  When the batch file is 
invoked from the menu, this is not a problem.  However, if it is invoked 
repeatedly from the a Windows command shell, the PATH environment 
variable gets longer and longer with each invocation, because the 
changed value of PATH persists after the batch file has completed.  
Eventually the PATH variable hits a maximum size limit and further 
invocations of the batch file will fail.

A simple solution to this problem is to use the setlocal command before 
setting any environment variables to ensure that all changes to 
environment variables persist only until the batch file completes.  This 
way, the value of PATH is not changed across invocations of the batch file.

I have attached a patch that updates packaging/win32/install.sh and 
packaging/win32/gnucash.iss.in, the former to include setlocal in the 
gnucash.bat file generated by the build process, the latter to include 
setlocal in the gnucash.bat file generated by the installer.

Cheers,

-Daniel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win32_setlocal.patch
Url: http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20071219/6766f49a/attachment.pl 


More information about the gnucash-devel mailing list