Getting o/s username in AIR
I am coding a RIA using Flex 3.2 to run in Adobe AIR. There is a requirement to capture and display the username of the user logged into the PC in the application. The PC might run Windows, Linux, or Mac OS.
So - how can I obtain the username from the o/s in Flex running in Adobe AIR ?
I have googled and read a lot - but not found a single answer to this question.
Any input is highly appreciated.
Thanks,
/Thomas.
Hi Thomas,
Currently the AIR SDK doesn't have native support for this but you might consider using one of the following two workarounds for it:
1. The first method is to use the File.userDirectory to extract the name of the user's folder and use it as the username (but this will not guaranty that it will be the same with the username in all the cases)
<html>
<head>
<title>Get Username</title>
<script type="text/javascript" src="lib/air/AIRAliases.js"></script>
<script type="text/javascript">
function init()
alert(air.File.userDirectory.name);
</script>
</head>
<body onload="init()">
</body>
</html>
</html>
2. Use the new NativeProcess functionality that exists in AIR 2 (currently in beta) to run a script that will get the username from the environment variables. More info on how to use this can be found at the following locations:
- http://www.adobe.com/devnet/air/flex/quickstart/interacting_with_native_process.html
- http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/desktop/Nati veProcess.html
Hope this helps you,
-Catalin
Similar Messages
-
The 'Command Get-ADUser -Identity <username> -Properties *' No Longer Works Due to a Bug in PowerShell 4 and Win8-1 Pro
It produces the following error:
Get-ADUser : One or more properties are invalid.
Parameter name: msDS-AssignedAuthNPolicy
At line:1 char:1
+ Get-ADUser -Identity ********** -Properties *
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (**********:ADUser) [Get-ADUser], ArgumentException
+ FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.ArgumentException,Microsoft.ActiveDirectory.Management.Commands.GetADUser
This is already documented in these forums:
1. http://social.technet.microsoft.com/Forums/systemcenter/en-US/1bf9568e-6adc-495d-a37c-48877f86985a/powershell-40-and-the-activedirectory-ps-module?forum=w81previtpro
2. https://connect.microsoft.com/PowerShell/feedback/details/806452/windows-8-1-powershell-4-0-get-adcomputer-properties-bug
Unfortunately, in typical style, Microsoft have archived number 1 without bothering to respond with advice. Can someone in Microsoft please advise your customers here if this is being investigated and of any available workaround or fix ?
-- huddie "If you're not seeking help or offering it, you probably shouldn't be here."Did you consider using one of the "workarounds" below to run an existing version of the AD Module for PowerShell under a specific PowerShell version:
a. #require -version 3.0 (in ps1 script)
b. powershell -version 3.0
Thank you for sharing with us if this helps.
Desmond, did you miss my reply below ? I still haven't heard back from you:
>> "Desmond,
>>
>> Thanks for your quick response.
>>
>> I'm running this just as a command, not in a script:
>>
>> Get-ADUser -Identity <username> -Properties *
>>
>> When I try to run powershell
-version 3.0 first, then run the above command, it still fails with the same error. When I then run Get-Host,
the version still shows as 4.0 so maybe there's more I need to do to launch a 3.0 host. Anyway, from what I've read it seems your command is more aimed at script compatibility.
>>
>> Can you help ?"
-- huddie "If you're not seeking help or offering it, you probably shouldn't be here." -
I'm trying to install Photoshop CS4, but it keeps getting stuck on "installing Adobe Air" every time. Freezes, makes no more progress, eventually I have to force quit. I've even downloaded and installed it (Air) separately, but it keeps getting stuck on it in the CS4 install. Any tips? I'm running 10.8.5 on a MacBook Air. Saw something about deleting Adobe FlashPlayer to maybe fix it? Any and all tips welcome. Thx.
Googling only comes up with a couple things where someone was trying to
install a cracked version they downloaded, so it could be a corruption
problem.
If this is a downloaded installer, then redownload it and try installing,
again.
If you are inserting a DVD and autoplay is starting up and you get this
message, you can shut down the installer process as you've done then instead
of double-clicking the DVD, use right-click Explore to view the files
directly on the DVD without running AutoPlay, then find the setup.exe or
something.MSI with EN in it's name to run the installer, directly, without
goint through autoplay. This would only make a difference if the autoplay
is corrupted somehow but everything else is ok. Since your error message
talks about autoplay then maybe that is the case.
If you are calling Adobe for support, it can take hours, depending on when
you call.
This "open letter to Adobe customers" was posted within the last few days
and basically apologizes for poor support, recently, while they change from
support-provider to another:
http://www.adobe.com/support/pdfs/open_letter_to_adobe_customers.pdf -
I recently bought a MacBook Air. I migrated the info from my old MacBook to the new Air. None of my contacts migrated. I still have them on my old Macbook, Ipad and iPhone. How do I get them to the new Air?
You can copy the iWeb application from the desktop machine to your new MBA. But if it's iWeb 2 it won't work with Mavericks or Mt. Lion. Also copy the Domain.sites file from the desktop to your MBA as that's the file with your webstite files in it.
Happy New Year -
How do i get apps from iMac to air
how do I get apps from imac to air. Just purchased an air
There are several ways to do it. The 'cleanest' way is to install them fresh on your Air. Anything you purchased from the Mac App store, you can install on your Air by logging into the App store with the same Apple ID.
-
How to get the Portal Username to SAP Transaction IView ( ABAP cust repor )
Hi Experts,
We have an ABAP program that will be exposed in portal as SAP transaction IVIEW. However the username that is being displayed in the report is the username that is defined in SICF > SAP > BC > GUI > ITS > WEBGUI. I tried to remove the username and password defined, changed the procedure to Alternative Logon Procedure and deleted some logon procedure list retained Basic and SSO Authentication but we are getting DDIC username. We have successfully implemented SSO, and it works in Personal Information of Standard ESS. The following are configure in our portal:
1. We have set SSO ticket
2. We are using User Mapping for portal and ABAP System
3. Retain Basic and SSO authentication
what could be the cause why the program (iview) is still getting the user instead of Portal Username? How can we get the portal username for our abap customized report exposed in iviewHi,
Make sure that the System you are using to connect to R3 has Log On Method and Authentication Ticket Type properties has SAP LOGON TKT as the value selected.
Path: System Administration --> System Configuration ---> Systems....
Regards,
SrinivaS -
We are having serious issues with one of our Google Apps accounts. We have done everything we can think of to get it to work properly on 3G but for some reason it continually asks for the user's password no matter how many times we enter it. However, it does work on WiFi!!
The iPhone says "Cannot get mail, the username or password for USERNAME is incorrect."
This happens on both Exchange and on IMAP accounts. We have deleted the accounts and set them up again several times but to no avail.
It is also worth noting that I have exactly the same settings on my identical iPhone and have no problems whatsoever so we think it may be something with the google configuration.
Please help!!Try a system reset. It cures many ills and it's quick, easy and harmless...
Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo. Ignore the "Slide to power off" text if it appears. You will not lose any apps, data, music, movies, settings, etc. -
How do I get my new username to come up in iTunes
How do I get my new username to come up in iTunes
Did you sign out of itunes and log back in with your new appleid?
If you did change it you can verify at appleid.apple.com also just to make sure your info is all correct. Itunes will say your name and not username when you log into itunes. -
Does anyone knows how can I get rid on my MacBook Air of a linkbucks website that appears to me when browsing?
Linkbucks, How I solved my problem
-
How to get userid from username
Hi All,
How can I get userid from username?
Thanks,
Anup GargHi Anup,
Userids are stored in Infotype PA0105 ( table ) and field USRID.
PERNR is the Employee Number.
To know the Employee name check Infotype PA0002 ( table ) and fields
NACHN Last Name
NACH2 Second Name
VORNA First Name
CNAME Complete Name
Best regards,
raam -
Can i get widescreen using FaceTime macbook air
can i open up to get widescreen on my mac air as i only get a third of screen.
What do you mean? Do you want the FT video box to be full screen?
Or the app to be full screen?
BTW, this is the Mac Mini desktop forum -
To get all the Usernames assigned to a Position in SRM
Hi Experts,
The function module BBP_OM_STRUC_GET_USER_FROM_POS is fetching only one username for that position.
I need to get all the usernames assigned to that particular position. Could you please help me out
Regards,
FarhanaHi
probably, you get the details from the table HRP1001.
Key in the postion number in the field ObjectID and execute.
Look at the CP relationship (subtype A008, CP is linked to US-username). If you have multiple users assigned to this position, it will display multiple CP entries with Percentage distribution (field PROZT).
R/Reddy. -
i have purchased (veranda magazines) for my IPHONE which I would like to use on my macbook air. Do I have to repurchase these app or is there some way to get them in my macbook air with no charge?
Veranda Magazine is a free app available for iOS devices in the iOS App Store. You then purchase a Veranda Magazine subscription from within the app. In other words, the app itself is free, but the contents are not.
There is no way to duplicate or import this to a Mac. Your Mac runs a totally different operating system.
iBooks can now import to Mac since OS X Mavericks came out about a month ago. But that does not apply to magazines or iOS Newsstand publications. -
my ipad 2 says "cannot get mail the username or password for sky is incorrect" but it is correct. My BT mail is fine. HELP
Try deleting and recreating the account on your iPad.
-
"cannot get mail" The username or password is incorrect?
"cannot get mail" the username or password is incorrect?
I got it going again... What I did was recreate my iCloud "[email protected]" email address through the "advanced" method on the ipad.
So, it was Settings > Mail, Contacts, Calendars > Add Account > iCloud > Then went manual from there on out. (Didn't use the suggested email address and created my own.)
I created a NEW me.com email address. Nobody had my old one, so it's just as well... This may not work for some people...
..and thanks for your reply Souad H...
All the best!!
-W
Maybe you are looking for
-
How long should the Mac Book pro hold its charge???
How long should the Mac Book pro hold a battery charge??
-
Creating Recover Disc - HP Pavilion 17 - I'm a novice at this and really need support
I downloaded information and directions for doing this procedure from the HP website. I have a couple of questions to clarify some of my concerns. 1. Using dvd - is the writable dvd the same one you would use for burning videos or different? 2. I ju
-
How to view when a table was last used!!?
Hi, Pls let me know where I can view when a table in the database was last utilitized i.e. any selection or manipulation was performed on it. Thanks in Advance, Abhi
-
Info required for any email adapter
Hi I have a requirement to send email from different applications for different purposes. So instead of using email facility of each individual application, it is designed to use some common service to send & monitor emails. So it is planned to devel
-
Poor Customer Experience - How to Report It?
Ive spent the better part of the last hour trying to understand how to connect with someone who will discuss my Apple customer experience with me. Everything is organized by product and technical or functional issue. I cant seem to talk to someone ab