Jump to content

Get Computer Name


This topic is 5379 days old. Please don't post here. Open a new topic instead.

Recommended Posts

If anyone was ever looking to get the computer name of the client rather than the host, here is the groovy to do that:


import java.util.*;

import java.lang.*;

import java.net.*;



try{

   String computername = InetAddress.getLocalHost().getHostName();

   return(computername);

 }catch (Exception e){

   return("Exception caught ="+e.getMessage());

}

Enjoy!

Angelo Luchi

The Drooling Dog, LLC.

www.thedroolingdog.com

1-877-810-8378

Link to comment
Share on other sites

  • 5 months later...

That's a good script.

If you want the computer's IP address, network card, gateway, etc, you can also issue a shellscript:

ipconfig /all

using the Run Shell Script function included with SM. For OSX a different function would be used.

Link to comment
Share on other sites

This topic is 5379 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.