I dont think there is a native way to do this.. correct me if Im wrong....
You could try using something like below, which strips it from the temporary path on Windows 7 anyway
This looks for /c:/users/USERNAME/appdata/local........
and would return USERNAME
Im not sure what the path would be on XP so you may have to experiment a little
path = Get ( TemporaryPath ) ;
start = position(path ; "/" ; 0; 3) +1 ; // find the position of the third / and add 1
end = position(path ; "/" ; 0; 4) // find the position of the fourth /
Middle ( path ; start ; end - start ) // get the text in the middle of those slashes
what about making a FM account for each user.
When the user logs into the PC, a vb script sets the registry value for the name FM picks up when it loads - and sets that to what the windows user is.
I am more than sure funds are limited in your situation, but if you have it you could use Active Directory / FMS to provide a single sign on type of feature.
Thanks for the replies so far, it sounds like it's possible, but I'm a retired engineer not a programmer.
Words like registry, active directory are all new to me (I assume FMS means file maker script) and it will take me a while to understand what's being suggested.
I take it there is no Filemaker "get" command that is suitable.
My example above works on Windows XP, Windows Vista and Windows 7 (I have just tested it)I did however change it slightly to prevent any issues with the temp path, by using the desktop path insteadEach user has their own desktop, therefore when logged in, the path to the desktop includes their windows name.let ([path = Get ( DesktopPath ) ;start = position(path ; "/" ; 0; 3) +1 ;end = position(path ; "/" ; 0; 4)] ;Middle ( path ; start ; end - start ))Windows XP : /C:/Documents and Settings/USERNAMEHERE/Desktop/Windows 7 : /C:/Users/USERNAMEHERE/Desktop/Windows Vista : /C:/Users/USERNAMEHERE/Desktop/The number of the slashes before the user name across all 3 is consistent
Thanks people, Especially SW.
I'll go away and have a play now.
I'll probably be back for more help, but so far you've come up trumps.