W3C home > Mailing lists > Public > www-amaya@w3.org > July to September 2001

BUG + WORKAROUND: Windows 2000 compatibility

From: Harry Johnston <harry@scms.waikato.ac.nz>
Date: Sun, 26 Aug 2001 21:51:01 -0400 (EDT)
Message-Id: <4.3.2.7.1.20010827124935.00b83740@pop.scms.waikato.ac.nz>
To: www-amaya@w3.org
Hi,

Amaya 5.1 doesn't run in Windows 2000 (unless the user has administrative 
privileges).  This is due to two similar but distinct problems:

1) The APP_HOME directory - where a user's personal settings are stored - 
is assigned by default to a directory in %windir%\profiles\$USERNAME.  This 
is sometimes (though not reliably) valid in NT4, but is never valid in 
Windows 2000.

Ideal solution: change the code to use SHGetFolderLocation (Windows 2000) 
or SHGetSpecialFolderLocation (NT 4)
to find the Application Data folder, although in NT4 the call might fail 
depending on the shell version, in which case the next best choice would 
probably be $USERPROFILE.

Second-best solution: change the code to use the $USERPROFILE environment 
variable instead of constructing the path manually.  In Windows 2000, 
$APPDATA would be even better, as it allows for folder redirection (so that 
the data can stay on the server instead of being constantly uploaded and 
downloaded).

Workaround for Windows 2000: in the [amaya] section of win-thot.rc, add a 
line reading

APP_HOME=$(APPDATA)\Amaya

In NT4 you could use $(USERPROFILE)\Amaya instead.

2) The temporary directories TMPDIR and APP_TMPDIR both default to using 
c:\temp which is usually valid in NT4 (though, again, not reliably) but not 
usually valid in Windows 2000.

Ideal solution: change the code to use $TEMP as the default.  This should 
always point somewhere writable.

Workaround: I didn't have any success with adding settings to 
win-thot.rc.  This may be another bug in the code; I'm not certain.

In Windows 2000, you can use junction.exe available free from 
www.sysinternals.com to create a junction point (soft link) at c:\temp 
pointing to the current user's temp directory.  If you create a junction 
point and make it writable by INTERACTIVE, the currently logged-in user can 
change where it points to.  Either add the command

junction c:\temp %TEMP%

as a logon script, or create a script that runs this command before 
starting Amaya.  This allows Amaya to run while presenting little security 
risk.

Of course, if you aren't worried about possible security implications, you 
could instead simply create a directory c:\temp and make it world writable.

Good luck!

   Harry.

---
Harry Johnston, http://www.scms.waikato.ac.nz/~harry
Received on Monday, 27 August 2001 03:26:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:24 UTC