Category: Adobe Air

If you have had the fun of deploying the Adobe AIR runtime and applications to hundreds of computers in an organization you will have no doubt stumbled upon at least one or two the annoyances that pop-up. The runner up for most annoying issue in my experience is the uninstaller.

In my development of "sometimes-connected" applications I have always had to write/store data on the local machine. The lacking feature of the built in uninstaller is the complete inability to remove this data. In my environment I needed to be able to have a solid roll-back plan of a piece of software; this unsuprisingly includes any downloaded content.

To solve my delema I wrote a VBScript file to perform the uninstallation. Similar to my installation process I wrote an install wrapper with Install Jammer. I did it this way to allow for easier "distribution" via SMS. I will highlight a few steps here and provide the full script at the end of the post. This script is obviously meant for Windows only and should work on windows XP, Vista and Windows 7. I have yet to have to distribute an app to anything other than a windows box.

First I grab the installer ID from the install path.Set wmiObj = CreateObject("Scripting.FileSystemObject")
Set oTS = wmiObj.OpenTextFile("{ ** AIR APP INSTALL PATH ** }\META-INF\AIR\publisherid")
publisherid = oTS.ReadAll

Then I get the uninstall executable path/arguments.Set wmiObj = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
 
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ ** AIR APP ID NAME ** }." & publisherid
strValueName = "UninstallString"

wmiObj.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

I then run the uninstaller: Set wmiObj = WScript.CreateObject ("WScript.Shell")
wmiObj.run strValue & " /quiet /qn"

Lastly I remove all leftover files:Set wmiObj = CreateObject("Scripting.FileSystemObject")
Set subFolders = wmiObj.GetFolder("C:\Documents and Settings").SubFolders

For Each folder in subFolders
    If wmiObj.FolderExists("C:\Documents and Settings\" & folder.name & "\Application Data{ ** AIR APP ID NAME ** }." + publisherid) Then
        'StdOut.WriteLine "Delete: " & "C:\Documents and Settings\" & folder.name & "\Application Data\{ ** AIR APP ID NAME ** }." + publisherid
        wmiObj.DeleteFolder("C:\Documents and Settings\" & folder.name & "\Application Data\{ ** AIR APP ID NAME ** }." + publisherid)
    End If
Next

 

Download My Full Example Script

After years of abuse of pop-ups and confirmation boxes users have become so honed at the skill of simply clicking the OK button on any kind of confirmation box that pops up that it has become almost nothing more than a reflex. This can cause some serious issues when it really matters.

In my flex application I needed to increase the chances of a user actually reading the notice in the pop-up box as much as reasonably possible within the user experience. The solution I decided to use is I believe fairly common to anyone with windows experience; it's also one I would use sparingly!

When the confirmation dialogue is presented the OK button is disabled at first. Instead a countdown timer is displayed on the button. After that timeout the user can then click "OK"; The cancel button is available at all times.


The code isn't rocket science and making use of the pop-up is so simple I won't even bore you with an example, but it is a nice quick fix if you need it.

Source view is enabled on the Flex demo

Like a High School romance I believe my love for Adobe Air has fallen by the way-side. Like many of you I saw the huge potential of Flex Apps on the desktop, all the cool amazing things I could do and all of the amazing new capabilities. I was drooling to write my first AIR apps after MAX Vegas...

Then reality hit me after recently being charged with creating several Adobe AIR applications; 1 large and 2 small ones. I love flex, I love ActionScript, I even still really like the Air Runtime. AIR truly allows you to do some things with the client side computer that will never be possible via a web browser. The local database, file extension capabilities and encrypted file store are a few. Also you can run larger applications faster and you can easily write agile “sometimes-connected” applications.

What is the reason for my waning love affair? It's really very simply: capabilities!

Adobe has tried so hard to lock down AIR to avoid the possibilities of someone writing a malicious program that they have turned it into a small shadow of what it COULD be.

 

  • ZERO ability to make system API calls
  • Inability to load DLLs and other Libraries
  • No registry functionality 
  • Can't launch outside/non-air applications 
  • Horribly locked down and inflexible install process/package 
  • Piss-poor uninstall capabilities

 

These are just a few of the things that have come to erk me over the last few months with AIR. The more I look at what I can't do with Adobe AIR, the more I realize that there just is absolutely no need for me write an AIR App unless it HAS to support “sometimes-connected” and I can't take the time to write it in anything else!

I understand that every technology has it's place and application; however I think AIR is missing a massive massive market by willingly or even striving at making it's self so ham-fisted just to play it safe. People write malicious VB, C++, C# and so on applications all the time. You don't see any calls out there from the masses: “Oh my god don't download that application, it was written in Visual C++ and might do bad things”!

My few months of working with Adobe AIR has left me feeling the same way about it as I do about Apple and their asinine rules surrounding the iPhone. Adobe can still fix this though, they can still add in the capabilities that I think should have been there from the start. Until then, I will continue to simply use Flex where it kicks-ass the most: the web!

 

If your available to go to Flash Camp Atlanta next week [8/28/09] there are still some tickets available. Not only should the line up result in a great one day conference but I'm sure some of the attendees will make for some good networking.

I usualy don't do this, but if someone is looking for a room-mate for Atlanta at the Omni CNN I would be interested. I'm not wasting an astounding 60,000 Marriott points for 2 nights at a low end Marriott Residence Inn... I'll be there Thu & Fri night since I'm flying in. Send me an email if interested: russ at EmpireGP dot com.

Flash Camp Atlanta is coming up next month.  Not only are the tickets to the all day event (9am-5pm) only 39.95 but flights and hotels are relativly cheap right now.

I think the gut reaction is that Atlanta is a long ways for a 1 day event, but the pricing overall is pretty reasonable for a wide audience.  I will be flying down from NY on Thursday night and leaving Saturday morning, my flight total was only a $175.

The theme for this go-around is "Enabling The Convergence of Art & Design With The Flash Platform". I know I for one am looking forward to being in the room with some great minds and learning a few things about "the science and art of the user experience". I know Andrew Powell / Universal Mind and others are working hard to put on another great event that won't dissapoint.

BUY TICKETS

The Speakers Lineup right now includes:

  • Greg Wilson, Adobe - Keynote
  • David Tucker, Universal Mind
  • Jesse Warden - Custom Components in Flex 3 & 4
  • Carl Smith, nGenWorks
  • Leif Wells, Roundbox Global
  • Doug Knudsen, Universal Mind
  • Ben Stucki
  • Christian Saylor, Universal Mind

 

Hopefully I'll get to see a few of you there so don't be shy!