To get the user name in filemaker 12 you use Get(UserName) or Get(AccountName).
Hi S. C.
Thanks for the reply. I am not sure these solutions will work because they are both assigned from within FM. If I am user "Jane" on my Windows machine. I can be "DataBaseJoe" while running an instance of FM because the use can be set via a preference panel (Edit).
I need to get to a place in the file system with user "Jane", not "DataBaseJoe".
I know that FM has this data and will give it to me in various paths, but I don't want to do the parsing and chance that something might change.
I think I may be suffering from confustion over the machine I am developing on which has "My Documents" on hard disk which is different than the one that Documents and Settings is located. This may be a non-issue. No need to reply. I need to figure out of I can use get(DocumentsPath) in my case.
Or maybe get ( desktopPath ) since each user has their own desktop directory with their user name. (At least it does in Windows...)
Either way, I think you can rely on the 2nd to last directory name being the user's local user account name.
I solved the problem by having the installer output a tiny .csv into the runtime folder. On startup, I have my FM initialization pick up this value which contains the path to the folder I want my help features and data dumps to occur into. The path is imported into a single field global table. The installer uses system environmental variable so these values will always be correct for the machine on which the FM runtime is installed, at least I think this will be true. More testing to be sure though.
I fogot to mention that the runtime folder is always available via get(FilePath). Getting rid of the last element of that path and replacing it with the name of the file containing the path spec does the trick.
I've heard of anti-piracy tricks that used such a file, but it was either hidden or added to the registry and then the solution checked for the file and the data in it when first opened. Given some of your other discussions, that trick may be worth investigating.