We have a Silverlight 5 app, with in and out-of-browser versions. The out-of-browser version is used to provide elevated rights, where accesses to local resources are needed.
Now we are facing installing the out-of-browser app in typical hospital environments. Here we have first of all, centralized deployments through GPO or other mechanisms. The second thing is providing scriptable links to single sign-on platforms that usually replaces to normal desktop with a launchpad of services available to the user. Direct access to physical c-drive might also be prevented.
As we know, the normal desktop link for a OOB SL-app is an unique parameter for sllauncher.exe.
How do you start to support deployment and installation of your app in this scenario?
You can install your XAP as an Out-Of-Browser application using a script to invoke sllauncher like this:
"C:\Program Files (x86)\Microsoft Silverlight\sllauncher.exe"
/install:"C:\temp\MyApp.xap"
/origin:http://www.mysite.com/ClientBin/MyApp.xap
/shortcut:desktop+startmenu /overwrite
The XAP needs to be available locally for this to work. (I haven't tried it from a network share.)
Related
I have a WPF application (let's call it Test.exe) which launches a WebBrowser control which needs to run in IE11 mode as it uses a VidyoWeb plugin installed on my host machine which requires IE11.
I have added an entry to the FEATURE_BROWSER_EMULATION registry key (in SOFTWARE/WOW6432Node/Microsoft/InternetExplorer/Main/FeatureControl since the application is 32-bit) as follows:
Name: Test.exe
Type: REG_DWORD
Value (decimal): 11001
When the application is not launched as an administrator then the plugin loads no problem. However when I run as admin the plugin isn't detected. I have no idea why the plugin wouldn't be detected when running with more privileges.
I am running the release exe of the application, not debugging using Visual Studio.
Typically on windows the installer performs a per user installation of per machine installation depending on the access privileges of the user. It sounds like you installed the plugin for that user account. Try installing the plugin from the admin account.
In Silverlight 5, applications can access the file system without restriction via FileInfo and related classes when running with elevated privileges. Also since SL5, an app can run inside the browser with elevated trust.
However, when running in-browser, all access to the file system appears to end up being routed to a special directory AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C....
This is a different behavior from running without elevated trust altogether, which throws a SecurityException. Out-of-browser, the behavior is as expected.
Note that in all cases I run the app through visual studio, which is, as far as in-browser support is concerned, all I'm interested in.
Is this desired behavior? Can I change it?
Why and when somebody would take out the Silverlight application out of browser and run? As this is feature provided in Silverlight 3.
When the application is useful enough that you want to use it often and you don't want to depend on a browser or an internet connection, for example.
In Silverlight 4, out of browser applications will make even more sense since they can run with elevated permissions and do things such as accessing the local filesystem or running applications on the client machine: http://silverlight.net/getstarted/silverlight-4-beta/#whatsnew (search For Trusted applications)
Very simple Winforms application I want to deploy manually. Can all the referenced assemblies simply go in the application folder or where should they be published? (In ASP.NET they can go in the \bin folder). I would rather not put in the GAC.
By default I place the referenced assemblies in the same folder I deploy the app to (or \bin for ASP.NET), barring a Very Good Reason to deploy to the GAC.
You can use .NET probind to define a relative folder where the application should search .dlls at start. You only need to add a simple config file with your application.
For simple apps, I deploy the executable and the config file in the root directory, and place the needed libraries in a lib subdirectory:
/
|-MyApp.exe
|.MyApp.exe.config
|-lib
|-Lib1.dll
|-Lib2.dll
Use this link from a recent anwer to find out how to create the config file
Eric J's answer is probably the correct one, but there is a reason to be wary of placing the assemblies in the application folder: Windows 7. I haven't run into this problem personally, since I'm still in Vista Hell, but apparently in Windows 7 the Protected Administrator account (which you normally run under) doesn't have write access to all application folders - it only has write access to application folders that were installed by that user. So if your application was installed by a Windows XP or Vista user, and then that user upgrades to Windows 7, your default Protected Admin user will be denied write permission on the application folder (since it has a different SID under the new version of Windows).
This problem would only affect you if you try to upgrade the dependent assemblies, and it would only affect users who installed your application under an earlier version of Windows and then upgraded to Windows 7, so I don't know how big a deal this would be for you.
See this article for more details.
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.
The BkMark example here shows how to start an application on startup using Adobe Air. So, yes it is possible.
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)
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.
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.