Getting the user name and computer name

I've been trying to find out how to do this, but can't seem to get it.
I have an AIR application that needs to get the user's login name, and computer name for verification.  I can't find anywhere to do this.  Is AIR able to get this information? Is there work arounds if there isn't?
It won't ever be a web app, just an AIR app.

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);
And sorry for the miss topic I just realized that it is on flex topic, but I post it either way it may be useful for anyone

Similar Messages

  • MDT 2012 Windows 7 Deployment Stops At User Account and Computer Name Setup Page

    I was given a sysprepped custom Windows 7 WIM image that was set up by a third party that didn't use MDT to create the WIM.
    I created a task sequence to deploy it, but it never finishes.  After the OS installs and it reboots, it comes up to the white setup page asking for a user name and computer name that looks like this image:
    Is there a setting in MDT that can change that behavior?

    Are you joining the computer to a domain?
    It sounds like MDT did not create the unattend.xml file itself (or is there an unattend file already in the image itself?)
    MDT needs to be able to autologin with the local admin account
    From MDT in your task sequence - OS info - Edit unattend.xml you can check if your unattended file is correct.
    Check what's in there for:
    - computer name in 4 Specialize area - Windows-Shell-Setup_neutral (it should be empty  if you want MDT to handle it).
    - Also i think you need to have in the Specialize section, under Microsoft-Windows-Deployment_neutral - Run Synchronous an EnableAdmin insert
    This will enable the local admin account
    - Also check in phase 7 oobe System in Shell-Setup_neutral
    There should be an autologon with a count of 999
    Check if you have any Local Accounts there.
    Finally read this:
    When I am joining clients to a domain, can I avoid creating a local user
    account on the computer?
    Yes. To do this, create an image unattend file that adds a domain account to the Administrators group. In addition, you must delete the <LocalAccounts> section if it is present in your
    unattend file (simply commenting it out will not work). An example file is below. Note that if domain join fails, Windows Deployment Services will not use the unattend file so you will be able to create a local account. For more information about creating
    unattend files, see Automating Setup.
    <?xml version='1.0' encoding='utf-8'?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:ms="urn:schemas-microsoft-com:asm.v3" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">
    <UserAccounts>
    <AdministratorPassword>
    <Value>password</Value>
    <PlainText>true</PlainText>
    </AdministratorPassword>
    <DomainAccounts>
    <DomainAccountList wcm:action="add">
    <DomainAccount wcm:action="add">
    <Group>Administrators</Group>
    <Name>DomainAdmin</Name>
    </DomainAccount>
    <Domain>DomainName</Domain>
    </DomainAccountList>
    </DomainAccounts>
    </UserAccounts>
    </component>
    </settings>
    </unattend>
    I tried opening the unattend.xml from the MDT workbench, but it errors out saying it cannot be done because the captured image is x86.

  • Where will i get the method code and method name in Bpc

    Dear Experts,
    Thanks for watching this thread at the time of creating Consolidation methods they have
    NEW
    HOLDING
    GLOBAL
    PROPORTIONAL
    EQUITY
    lEAVING (END OF THE YEAR)
    LEAVING(DURING THE YEAR)
    Where will i get the method Code and method name.
    Can you please guide me.
    Regards,
    Srinivasan.

    The consolidation methods types you have listed are the standard ones  provided by BPC for Consolidation Method types.
    You can set the Consolidation Methods in the BPC Administration Console under Business Rules Library -> Consolidation Methods.
    There you can see some defaults - you can remove these and set your own if you prefer.
    You should read the BPC340 Training guide.

  • If I do a repair the windows small business server 2011 standard repair console, will I loose the user's and computer's that are currently setup on the server ?

     will I loose the user's and computer's that are currently setup on the server?

    Hi,
    Based on your description, I understand you want to repair SBS 2011 console (please refer to
    the TechNet article:
    Repair the Windows Small Business Server 2011 Standard Console). However, worry about losing users and groups that be created by Windows SBS Console. As far as I know, those will not lose.
    Since, when you create users and groups via SBS console, those are added to Activity Directory.
    The SBS console is a GUI component, which makes it easy to configure and manage your Windows SBS 2011 Standard network. When you repair the SBS console, this component will be affected.
    In view of your concerns, please back up before operation. It will help us to avoid some unexpected
    issue.
    Hope this helps.
    Best regards,
    Justin Gu

  • Need to the domain name and computer name in offline mode

    Hi,
    I can not able to login to the windows system, the password i am using is correct. But im getting error "the login method using is incorrect, please contact network admin". I forgot the domain name i set to login to the system. Now Currently i
    dont have the recovery/windows7 disks.  I have Unix in my machine as well. so i have mounted the windows7 parition in linux, and trying to find out the computer\domain name.  so please suggest which file i need to search to get the details.
    Thanks,
    Ravi

    Hi Ravi,
    If you want to know more information about domain name, please take a look at the following article.
    http://technet.microsoft.com/en-us/library/cc731265(v=ws.10).aspx
    Based on my research, the computer name and domain name are stored in the registry key.
    We could find computer name in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName.
    And we can find domain name in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Domain.
    Have you ever  joined a domain?
    If yes, please contact the network admin as mentioned.
    And we can type Domain name\Username and then password to login.
    If you haven’t, we could try to type Computer name\username(.\username) and then the password to login the computer.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • STAD - get the 'transaction code' and 'program name'

    Hi, I was wondering if someone knows about a bapi with which I can get only the "transaction code" and "program name".
    I need to get those for a specified user, but I don't want to set on a trace, that's why I'd like to use the transaction STAD.
    If anyone can help, thanks in advance
    Grtz,
    Dragovian

    ok, so I go like this
    TYPE-POOLS sapwl .
    DATA:  all_stats        TYPE sapwl_allstats.
      CALL FUNCTION 'SAPWL_READ_STATISTIC_FILES'
       EXPORTING
         read_client                 = '*'
         read_time                   = '200000'
         read_start_date             = sy-datum
         read_start_time             = '000000'
         read_username               = sy-uname
         read_workprocess            = 'FFFF'
         wait_factor                 = 150
        CHANGING
          all_stats                   = all_stats
    how'd I get "start-time" "report-name" "date" "username"?

  • How do i get the user id and responsibility id

    Hi
    I have coded my own jsp page and being given function in Oracle Apps in order to open my jsp page.
    Its opening properly.
    But i need to capture the user id and responsibility id of the person who logged in. I created the function in a particular responsibility only. I need to know the responsibility id and user id.
    I am using oracle 11.5.10. I know in previous versions with FWAppsContext. But in 11.5.10, i am not able to see the methods like getUserId() and getRespId() in FWAppsContext class.
    Please help me out, its very urgent.

    You can get the webAppsContext from your custom jsp using the following code.
    import oracle.apps.fnd.common.WebAppsContext;
    Import oracle.apps.fnd.common.WebRequestUtil;
    WebAppsContext webAppsContext = WebRequestUtil.validateContext(request, response);
    getUserId and getRespId are public methods which can be accessed through webAppsContext.

  • To get the user exits and modification points

    Hi Experts,
    I am able to find all user exits for a particular transaction,but is there a way to find it for some specific actions alone.
    Need to find the user exits and enhancement points that are called while clicking a specific button in a standard transaction.
    Your help is highly appreciated.
    Regards,
    Sridevi

    Hi
    To find out the userexits at position where you need you should see the description of the USER EXIT.If you find that it is close to the point where you want then put up a break point inside it and re - run the transaction.
    Also you can check SDN post to find out your user exit.
    FOR BADI -
    1 )You can put breakpoints at method GET_INSTANCE of class CL_EXITHANDLER and  CALL FUNCTION statements.
    2) You can run through SPRO transaction for the particular Functional area and understand the available exits or BADIs .
    Regards
    Gaurav

  • Reading windows user id and computer name

    I am using servlet and jsp's in my web application. I want to read clients computer name and their windows userId in jsp. How I can do this?
    Thanks,
    Reddy

    You can use an Applet to do this but you'll need to sign the applet and the user will need to have jre1.3 or greater installed (see Java Plugin).

  • Audit the IP adress and computer name

    Hello,
    I need to audit the IP adress and the computer name from where a user logged into Hyperion Planning.
    Is there any way to audit that?
    Or any log where i can see that?
    Thankyou!
    Nat

    What iP address is shown?  If it starts with 169 yo never connect to the router.
    Have you tried powering off and then back on your router?
    Does the iPod successfully connect to other networks?

  • How to get the xml element and comment name in a page?

    I need to list all element and comment name in a page

    Hi,
    do
      //K2Vector<XMLReference> allXMLRefs;
                        std::vector<XMLReference> allXMLRefs;
      IActiveContext* context = GetExecutionContextSession()->GetActiveContext();
                        UIDRef documentUIDRef = ::GetUIDRef(context->GetContextDocument());
                        XMLReference rootXMLRef = GetRootXMLReference(documentUIDRef);
                        GetFlattenedElementList(documentUIDRef,allXMLRefs);
                        std::ostringstream os;
                        for(std::vector<XMLReference>::iterator it = allXMLRefs.begin(); it != allXMLRefs.end(); ++it)
                                  XMLReference nextref = *it;
                                  PMString tag_name;
                                  os.str("");
                                  os <<  AsString(nextref,tag_name).GetPlatformString().c_str();
      CAlert::WarningAlert(os.str().c_str());
              }while(kFalse);
    I use above code to get tag name.
    Any one help me to get the comment tag in XML

  • Why does the local network and computer name keep changing?

    After upgrading to Yosemit the local network name and computername on my iMAC keep changes link:
    Mycomputer-1
    Mycomputer-2
    Mycomputer-3
    Why?
    I have tried to change it back in sharing and network locations.
    Is this also the reason the my iPhone cannot find my iPhone often cannot find my iMac when I will sync it? Then I have to restart the iPhone and iTunes on the computer. This happens very very often.
    Maybe it also linked to these errors which the log is full of - many every minute:
    19/10/14 12.11.09,522 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:256
    19/10/14 12.11.09,543 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:12856
    19/10/14 12.11.09,561 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:0
    19/10/14 12.11.09,565 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:44032
    I think the is some bug/clash between bonjour and other network protocols. That is only a guess.

    After resetting the computer name and local host name to the correct name without the number I also shotdown my iMac, my AppleTV, my iPhone, my iPad and then rebooted my Airport/Time capsule it seemed to work at least for several days. But yesterday I discovered that my Apple TV now also has changed name to Apple TV (2).
    I logged into iCloud.com to see my devices and here it was really wired. My Apple TV was called Apple TV (2) and my iMac also had (2) after the name. Then I checked it on the iMac but here it was correct! Why can it have one name on the iCloud and another on the computer.
    I restarted both the iMac, Apple TV and Airport Time capsule then everything was correct also on iCloud.com.
    But today the iMac was called the name (2) again on the iMac. And now the local host name also had -2 after the name. It has not always been both names that has changed. That is really wired. And today Wifi was not working on the iMac after wake from sleep. I changed the name back and rebooted again also the Airport Time capsule. Now it is working again.
    The log is still full of this messages:
    02/11/14 19.22.13,186 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:1901
    02/11/14 19.22.25,738 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:34051
    02/11/14 19.22.25,758 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:12342
    02/11/14 19.22.25,900 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:34051
    02/11/14 19.22.25,919 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:1901
    02/11/14 19.22.27,636 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:28772
    02/11/14 19.22.27,683 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:27693
    02/11/14 19.22.27,714 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:28533
    02/11/14 19.22.49,833 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:29281
    02/11/14 19.22.49,866 discoveryd[53]: Basic DNSResolver  dropping message because it doesn't match the one sent Port:0 MsgID:28528
    The name is not the only problem. Often itunes will not find my iPhone and iPad. Then i need to close iTunes and restart the iPhone and iPad then it works for some time.
    And the iPhone and AppleTV will not always wake the iMac from sleep. I am wondering if the is linked to the changing of name.
    I have seen by googling that it can be related to a sleep proxy problem so it seems like that here is two devices on the net with the same name that is why name is changing, but to know this do not help me to solve the problem. I have also seen all the suggestion to turn almost every services off on the computer, but again I it is not a solution and I have the iMac and devises to use the functionality not to shot everything down. So I do not really understand people saying turn off itunes, turn off blueboth, and turn off this and that.
    Apple must soon come with a real solution. We are really many people have these problem since we upgraded to Yosemite and iOS 8.
    I have also listed some of the iTunes errors from the log below:
    02/11/14 19.24.48,160 com.apple.xpc.launchd[1]: (com.apple.quicklook[1364]) Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook
    02/11/14 19.24.52,279 Console[1368]: Failed to connect (_consoleX) outlet from (NSApplication) to (ConsoleX): missing setter or instance variable
    02/11/14 19.25.06,907 iTunes[480]: Entered:_AMMuxedDeviceDisconnected, mux-device:5
    02/11/14 19.25.06,908 iTunes[480]: Entered:__thr_AMMuxedDeviceDisconnected, mux-device:5
    02/11/14 19.25.06,908 iTunes[480]: tid:17d8b - Mux ID not found in mapping dictionary
    02/11/14 19.25.06,908 iTunes[480]: tid:17d8b - Can't handle disconnect with invalid ecid
    02/11/14 19.30.19,234 com.apple.usbmuxd[56]: _SendAttachNotification Device 30:f7:c5:30:b8:2b@fe80::32f7:c5ff:fe30:b82b._apple-mobdev2._tcp.local. has already appeared on interface 5. Suppressing duplicate attach notification.
    02/11/14 19.30.22,192 soagent[429]: Can't allocate SOHelper <SOMessageHelper: 0x7f9053a102c0> inside com.apple.soagent
    02/11/14 19.30.54,871 iTunes[480]: Entered:_AMMuxedDeviceDisconnected, mux-device:6
    02/11/14 19.30.54,871 iTunes[480]: Entered:__thr_AMMuxedDeviceDisconnected, mux-device:6
    02/11/14 19.30.54,871 iTunes[480]: tid:1a23b - Mux ID not found in mapping dictionary
    02/11/14 19.30.54,871 iTunes[480]: tid:1a23b - Can't handle disconnect with invalid ecid
    02/11/14 19.32.06,137 com.apple.usbmuxd[56]: _SendAttachNotification Device 30:f7:c5:30:b8:2b@fe80::32f7:c5ff:fe30:b82b._apple-mobdev2._tcp.local. has already appeared on interface 5. Suppressing duplicate attach notification.

  • Error connecting, tap to retry, it sees my WiFi and computer name but can't connect

    Hi all, I am trying to get Edge Inspect to work on my Windows 7 PC (it did work for me a few times when I had it installed as Shadow when it initally came out)
    I have read through various forum posts. I am also running Mcafee Virusscan/Firewall. 
    In Google Chrome I have the extension installed at the little "In" symbol top right, when I click it it says Adobe Edge Inspect "On", please start the Adobe Edge Inspect Application.
    I open up the lastest version of Edge Inspect (v1.0.393) on either my iPhone or iPad, it shows the name of my WiFi router and shows the name of the computer that is running Google Chrome, it looks like it is searching for a connection (shows spinner) and then it says "Error connecting, tap to retry".
    I have opened up port 7682 in my Mcafee Firewall
    I have shutdown all open programs
    I have tried manually entering in the computer IP address via manual connect
    I have updated chrome extension and ios apps to latest version
    I have tried reinstalling chrome extension
    I have tried at Windows Command prompt "netstat -ano" it doesnt show port 7682 being used, until I open up Google Chrome, then it shows MYCOMPUTER:7682 SYN_SENT, which I checked the PID against and yes it is Google Chrome using 7682
    Any help would be great

    Hi again Mark, still no luck here.
    I also have a Mac in my network so I thought I'd try installing to that to see what would happen, I just installed Adobe Edge Inspect extension onto Google Chrome on that machine and restarted the iOS apps on both iPad and iPhone and they actually didnt see the Mac machine at all, still just shows the PC computer.
    Also did I mention on my iPad I can still see the last time the connection actually worked (when it was called Adobe shadow, on my iPad underneath MYCOMPUTERNAME Error Connecting, tap to retry it has MYCOMPUTERNAME Last Used 24/07/12 8:59PM). Wouldnt have anything to do with a conflict with the old Adobe Shadow or anything would it, I'm pretty sure Adobe Shadow got uninstalled by default anyway, just a thought.
    So I'm not sure if it can be a problem with the Router because nothing has changed with the router since the last time it successfully worked when it was Shadow? I did add the Mac machine to the network since this time, but that machine hasnt been on when I have been doing any of this testing anyway.
    Also in the Edge Inspect in the Chrome browser I do not see any deviced listed, but back on the iOS App I do see the Wifi network and Computer name as discussed, so does this mean its an inbound connection issue or?
    Also sent you router settings via private message etc.

  • If I get a user to enter their name as a variable and I am linking one movie to another using a button, is there a way to carry the user name forward into the second movie?

    If I get a user to enter their name as a variable and I am linking one movie to another using a button, is there a way to carry the user name forward into the second movie?

    Hi there
    See if the link below helps
    Click here
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How do I get the user name and password for the Apple Extreme Router to connect to a Slingbox

    How do I get the user name and password for the Apple Extreme Router to set up my Slingbox?  It will not accept the Apple Extreme Name and password.

    The AirPort Extreme does not have a User Name, but it does have a device name and device password, which you may have already tried.
    There is also a Wireless Network Name and Wireless Network Password for the AirPort Extreme, which might be what the Slingbox is looking for if you are trying to connect it to your wireless network.
    There are no other "user names" or "passwords" on the AirPort Extreme.
    You established the device name, device password, wireless network name and wireless network password when you originally configured the AirPort Extreme.
    If you cannot remember these, you will need to perform a Soft Rest to reset everything. Follow the instructions in this Apple support document:
    Resetting an AirPort Base Station or Time Capsule FAQ

Maybe you are looking for

  • FileVault and Recovering Data

    I am having a strange issue restoring my data from a Time Machine backup. When I use mirgration assistant it does not allow me to import my identity. It says "********" user cannot be imported because it is encrypted. This encrypted file "my idenity"

  • Third Party Plug Ins from old computer?

    Before I ask my next question, I just want to thank everyone out there that take the time to help others on this board. I have a non bootable drive from my old computer (just died last week, power supply) and I also have it's contents backed up on an

  • USB wifi

    I have a flat panel imac with 256mb of memory, an 800 mhz processor and OS 10.2.8. Is it possible to use a USB stick to access a 3com wifi setup. if not would an internal card work and are they available. Thanks in advance. Robert.

  • Problem with jdbc query

    hi i have a problem in executing a query in jdbc. i.e it executes all the query but the effect of last query is not reflected in database(Ms Access). if i use one query it will work properly.this problem occurs when i use more than one query. could t

  • Reg. Stock account posting stead of  consumption account

    Dear Experts Pls consider my below senario As per SAP the material goes to consumption account when GR made. but our concern wants to keep the material at unrestricted stock and that is to be used as and when required for production. how to configure