Getting the name for a Windows Users 'home'

Adrian Williams adrian at clubtype.co.uk
Fri May 8 12:24:32 EDT 2009


Thanks to all for the advice about Mac Users/home.
The short version was successful:
/Users/~/Library/Fonts

I now need to delete files from Windows Users/home.
Is there an equivalent short version path for Windows or is  
'specialFolderPath' used to get this?
If so, how may I use it?

On VISTA for examplethe path appears to be:
C:\Users\????\AppData\Roaming\Microsoft\Start Menu\ Programs 
\MyFileToBeDeleted

Is the specialFolderPath uses differently in XP and Vista?
Any clues would be a great help,
Thanks,
Adrian
______________________
Club Type
http://www.clubtype.co.uk
<adrian at clubtype.co.uk>


On 25 Apr 2009, at 02:56, Andre Garzia wrote:

> also shell("whoami") gives you the name of the logged user.
>
> On Fri, Apr 24, 2009 at 7:11 PM, Sarah Reichelt <sarah.reichelt at gmail.com 
> >wrote:
>
>> On Sat, Apr 25, 2009 at 1:28 AM, Adrian Williams <adrian at clubtype.co.uk 
>> >
>> wrote:
>>> Hello all,
>>>
>>> Installing fonts into the Public domain is a breeze:
>>> MacHD/Library/Fonts/MyNewFont.ttf
>>>
>>> But I need to install and uninstall fonts in the Users domain. For
>> example:
>>> MacHD/Users/someunknownname/Library/Fonts/MyNewFont.ttf
>>>
>>> How can I retrieve 'someunknownname' from any computer and place  
>>> it in a
>>> variable in the pathname?
>>
>> $USER gives you the name of the current user.
>> However specialFolderPath() might provide the exact folder path you
>> need. As well as the docs, check out Ken Ray's list of usable codes
>> for this: <http://www.sonsothunder.com/devres/revolution/tips/file010.htm 
>> >
>>
>> BTW, in OS X & Rev, you don't need to include the MacHD part in your
>> file path. /Users/username/Library.... is the way such folders are
>> specified.
>>
>> Cheers,
>> Sarah
>>






More information about the use-livecode mailing list