Windows Environment Data

Does anyone know how to access the username and machine number of your machine from XOJO?

Note: only for use in the Windows environment.

In advance, thanks for any response you can give me.

Look at System.EnvironmentVariable.

The example shows what you are looking for.

Thanks Maurizio !!!

I share my solution and works fine.

#If TargetWindows Then
Compname = System.EnvironmentVariable(“COMPUTERNAME”)
Username = System.EnvironmentVariable(“USERNAME”)
#EndIf

If you use MBS Plugins, you can use the SystemInformationMBS module.