views:

401

answers:

4

Hello,

I've become familiar with the new concept of "out of browser" web applications, supported in the recent Silverlight, JavaFX, Adobe AIR etc.

Listening recently to a podcast on the subject by Scott Hanselman, I've become aware that one of the purposes behind these new architectures is to allow for "desktop-application-feel". Also, I understand some (or all) of these allow for some offline access to a sandbox of resources. This really sounds as if these frameworks could be an alternative to "real" desktop applications, as long as the application does not require messing with the user's machine (i.e. access to peripherals, certain file IO, etc).

I have a very specific question. My application needs to run at start-up. Is it possible to do so using such a framework without requiring the user to download and run a certain executable?

For example, I could always direct the user to download a small EXE that will put a .lnk file in the start-up directory, but I want to avoid such a patch.

To summarize: is it possible to have an out-of-browser web application setup itself to run at start-up without requiring file download?

To further clarify, this question does not come from an "evil" place, but rather from trying to decide whether "out-of-browser" frameworks are indeed a proper alternative to a desktop application, for my specific requirements.

+1  A: 

The BkMark example here shows how to start an application on startup using Adobe Air. So, yes it is possible.

Chacha102
Trying to install it, the app is noted as having "UNRESTRICTED" access to my computer... I'm unfamiliar with AIR, but is this the standard modus operandi?
Roee Adler
Yeah, almost every application I see has 'UNRESTRICTED' access. I'm sure it can't do any harm considering it is coming right from adobe's site.
Chacha102
You want to look in Main.js.
Chacha102
@Chacha: I understand Adobe's apps will be unrestricted, and I'm sure they specifically can't do any harm, after all they were written by Adobe... But I would not trust a 3rd party web application that has unrestricted access - am I missing anything? Do all AIR web-apps have unrestricted access? I would guess no...
Roee Adler
AIR apps will have access to your computer after you've installed them. That is a feature. 'Normal' apps like your texteditor or browser have the same permissions.
Simon Groenewolt
A: 

Assuming you are building for Windows, launching an executable at startup can be done several ways.

For user session startup, you can achieve this either by putting a lnk file in the appropriate folder, or with a registry entry. For operating system startup, you can achieve this with a registry entry. There are several permutations:

  • run application once on boot (UI not allowed)
  • run application every boot (UI not allowed)
  • start service every boot according to policy set in registry
  • run application once on user session start
  • run application every user session

Since an out of browser application has UI I expect you mean run application every user session and in this case you may as well put an LNK file in the user's startup folder.

I just created a shortcut for an SL4 OOB application, and this was the Target of the shortcut:

"C:\Program Files (x86)\Microsoft Silverlight\sllauncher.exe" 2635882436.localhost

A search of my disk revealed that location 2635882436.localhost is a folder.

C:\Users\<mylogin>\AppData\LocalLow\Microsoft\Silverlight\OutOfBrowser\2635882436.localhost

I rather doubt an OOB app of any type could place a shortcut in the Startup folder unless you somehow obtained Full Trust.

Peter Wone
@Peter: can a web application put a LNK in the start-up folder? If so - how? Could you give an example for either Silverlight or AIR? Thanks
Roee Adler
A: 

So, here's the deal: web apps in general will have a security context around them, and by default won't have access to write to the filesystem (outside of a temp files), access the registry, etc.

One way is, as you said, have the user run something or configure it so the lnk is executed on startup.

Another way, and I think, more in line of what you want, is that the user can run the program himself, click some button in the application, and it's configured.

I know with Java you could do this, but the user has to allow full access to their system, because your app would need to change System configuration. Then you could just configure it (by writing a lnk to your WebStart JNLP in the Startup folder)

Milan Ramaiya
A: 

For Internet Exploder, Javascript apps do have write access to the disk. For other (better-secured) browsers you will either need to have a download, or Adobe AIR.

FrozenFire