Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4122158
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:26:44+00:00 2026-05-20T23:26:44+00:00

Hi all: Can anyone tell me how to get local computer name using Adobe

  • 0

Hi all:
Can anyone tell me how to get local computer name using Adobe AIR.

Please reply me as soon as possible. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:26:45+00:00Added an answer on May 20, 2026 at 11:26 pm

    This might do the trick.

    Last post on the page.

    What I did in Air 2 to accomplish that is the following:

    public function getHostName():void {  
        if(NativeProcess.isSupported) {  
            var OS:String = Capabilities.os.toLocaleLowerCase();  
            var file:File;  
    
            if (OS.indexOf('win') > -1) {  
                 //Executable in windows  
                 file = new File('C:\\Windows\\System32\\hostname.exe');  
            } else if (OS.indexOf('mac') > -1 ) {  
                 //Executable in mac  
            } else if (OS.indexOf('linux')) {  
                 //Executable in linux  
            }  
    
            var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
            nativeProcessStartupInfo.executable = file;  
    
            var process:NativeProcess = new NativeProcess();
            process.addEventListener(NativeProcessExitEvent.EXIT, onExitError);  
            process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutput);  
            process.start(nativeProcessStartupInfo);  
            process.closeInput();  
         }  
    }  
    
    import utls.StringHelper;
    public function onOutput(event:ProgressEvent):void {  
        var strHelper:StringHelper = new StringHelper();
        var output:String = event.target.standardOutput.readUTFBytes(event.target.standardOutput.bytesAvailable);
        output = strHelper.trimBack(output, "\n");
        output = strHelper.trimBack(output, "\r");
    
        trace('"'+output+'"');
    }
    

    The package that I used is from the manual:

    package utls  
    {  
         public class StringHelper  
         {  
              public function StringHelper()  
              {  
              }  
    
              public function replace(str:String, oldSubStr:String, newSubStr:String):String {  
                   return str.split(oldSubStr).join(newSubStr);  
              }  
    
              public function trim(str:String, char:String):String {  
                   return trimBack(trimFront(str, char), char);  
              }  
    
              public function trimFront(str:String, char:String):String {  
                   char = stringToCharacter(char);  
                   if (str.charAt(0) == char) {  
                        str = trimFront(str.substring(1), char);  
                   }  
                   return str;  
              }  
    
              public function trimBack(str:String, char:String):String {  
                   char = stringToCharacter(char);  
                   if (str.charAt(str.length - 1) == char) {  
                        str = trimBack(str.substring(0, str.length - 1), char);  
                   }  
                   return str;  
              }  
    
              public function stringToCharacter(str:String):String {  
                   if (str.length == 1) {  
                        return str;  
                   }  
                   return str.slice(0, 1);  
              }  
         }  
    }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me how to get all Lat,Long values between to locations...??? As
Can anyone tell me that How to get tag of a UIButton when i
Can anyone tell me why this crashes my app? There seems to be some
Can anyone tell me why when I ran a script with the below contents
Can anyone tell me how I can sort this: {'a': [1, 2, 3], 'c':
Possible Duplicates: C# - Get list of open tasks On Windows XP, how do
I've opted to use UIWebView so I can control the layout of text I've
I am creating a 3-column UI with grid splitters between the columns. I have
I'm trying to "fix" a build on our TF Server that drops everything into
I'm trying to set up a web server that will support streaming video to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.