In the desktop build, I'm trying to use the likes of %USERPROFILE% and its not working. I know with those environment variables you can find out the username (as in user-id), but there's a persons full name that I'd prefer to grab if anyone can help. Is it a registry call?
The door library comes to the rescue:
obj is an Object.
B4X:
Sub App_Start
Form1.Show
obj.New1(false)
obj.CreateNew("System.Environment")
fullPath = GetPath("%USERPROFILE%")
Msgbox(fullPath)
End Sub
Sub GetPath (env)
Return obj.RunMethod2("ExpandEnvironmentVariables",env,"System.String")
End Sub