---bill lam wrote:
> Sherlock, Ric wrote:
> > The problem this would introduce is how to detect Vista vs XP (and
> > therefore Documents vs. My Documents) in profile.ijs.  Then 
> there are
> > the use cases of usb installations and users who relocate their
> > Documents folders.
> 
> FWIW window version can be obtained by api call
> 'kernel32 GetVersion i' 15!:0 ''
> versions
> w2k 5.0
> winxp  5.1
> vista  6.0

Yes it's not as bad as I thought. Something like this might work too.
*#1!:0 <hom,'\My Documents'

Could put it together like this.

hom=. 2!:5>(5=9!:12''){;:'USERPROFILE HOME'
homsub=. '\Documents';'\My Documents'
homsub=. (*#1!:0 <hom,'\My Documents') {:: homsub
homsub=. (6=9!:12''){::'';homsub
hom=. hom,homsub
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to