Get Windows Computername and Username using .NET

You can use .NET to get client info like Computername and Username of both the server and the client.

Create a variable of type DOTNET to System.Environment in mscorlib.
If you set RunOnClient to Yes, you get info from Windows Client maschine, if not you get info from the NAV Server.


Lets see some examples:

// Get computername
// Get username (without domain)
// Get domain
// Check if the running client is 64-bit

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s