Updating application remotely on Windows 10 - upgrade

For Windows (7/8/10) platform I am looking for an open source application upgrade library where it downloads the installer in the background and when it is complete triggers a fresh install procedure preferably completely in the background.
Skype, Chrome etc. does this type of thing to keep their apps up to date without any user interaction. I looked around but couldn't find a readily available library I can integrate with my application.

Related

How to delete dynamic feature module after uninstall?

My application has 2 features: "base" and "extend".
manifest extend feature:
<dist:module
dist:onDemand="true"
dist:title="#string/title_extend">
<dist:fusing dist:include="true" />
</dist:module>
download feature with SplitInstallManager -> startInstall
unintsalling with SplitInstallManager -> deferredUninstall
Check installed modules with SplitInstallManager -> getInstalledModules
Extend feature is loading from play store success and work as expected. When this feature has become unnecessary - uninstall it.
more, SplitInstallManager has callbacks: SuccessListener, FailureListener, CompleteListener. Install and Uninstall completely with success (no errors).
But, after uninstalling Extend feature (and after restart application) it is stay installed.
How to delete uninstalled feature from the application (need remove no used code and resources) ?
As explained in the API of the deferredUninstall method:
Once called, the Play Store will try to eventually remove those modules in the background.
The uninstalled modules will be removed while the app is not working at some point in the next 24 hours.
Here is what I noticed.
1) Uninstalling the app removes the downloaded modules, so the next time you run the app, the app will download the modules again.
2) Clearing the app data (e.g. adb shell pm clear APP_PACKAGE_NAME) makes the module not available to the app immediately, but if the module is already downloaded before clearing the app data, it won't be downloaded again. In other words, you won't see SplitInstallSessionStatus.DOWNLOADING.
3) Once the downloadable module becomes available to the app, clearing the app data of "Google Play services" (i.e. adb shell pm clear com.google.android.gms) doesn't make a difference. But occasionally, the downloadable module sticks around even after uninstalling the app, especially when the module's name changes. Then 3) becomes handy to clear the stale modules.
I think what's happening here is when the app requests a downloadable module, Google Play services downloads the module, hands it over to the app, and caches a copy of it, just in case the app requests it again. If the app is uninstalled, Google Play services removes the cached module. deferredUninstall() is just asking Google Play services to uninstall the modules if necessary, but we have no control on when that would happen, if ever.
from https://developer.android.com/guide/app-bundle/playcore#uninstall_modules:
Module uninstalls do not occur immediately. That is, the device uninstalls them in the background as needed to save storage space. You can confirm that the device has deleted a module by invoking SplitInstallManager.getInstalledModules() and inspecting the result, as described in the previous section.
So You could try to fill up storage space on your device and see if that triggers an uninstall :)
By the way: On the play store page for the app that I am currently testing via "internal early access", there is a section "deferred actions" which lists all modules marked for deferred uninstall. There also is a button "run deferred actions" which actually removes those modules completely.
As far as my own testing has gone, uninstall is deferred until the app is updated by Play Store. Otherwise I assume Play Store services will eventually wait for the app to be totally inactivate to update its uninstalled module (the app has to be restarted for that update to occur).
I've filled a bug to find out if there's anyway to force the (un)install of on-demand modules: https://issuetracker.google.com/u/1/issues/172108742. And a way to tell which modules are truly installed.
Same goes for installing actually, until app is updated, on-demand modules are "emulated", which prevents those 2 things from happening:
The platform can not apply any new manifest entries introduced by the module.
The platform can not access the module’s resources for system UI components, such as notifications. If you need to use such resources immediately, consider including those resource in the base module of your app.
As explained here: https://developer.android.com/guide/playcore/play-feature-delivery#access_downloaded_modules
There seem to be a long road ahead before on-demand modules work properly.

Can a gwt app be converted/packaged as windows universal app?

I have a gwt developed website that already runs 100% client-side (by which I mean no server-side javascript is used)
As one of the options for windows universal app development is javascript, is it possible to somehow turn a online gwt app into a offline uwp one?
I am aware there are solutions to package websites together with browser+installer, but if windows can run js 'natively' now (I assume via Edge) it seems a better route.
You can use UWP Javascript project from Visual Studio. This project allows you to add any HTML/CS/JS requires files. You can also use the Hosted model, where your files are downloaded from a URL (but then the app will require connectivity).
I've not tried the scenario, but I don't see any impediments, it should work.

Distributing Windows Application through internet

We have window application developed in .Net and want perfect deployment technology
which enables easy application installation and upgrading.
The client can be accessed from anywhere in the world where an Internet connection is available.
In future we want the same deployment technology for provide support user's who use Window 7 and
Window 8
Looking at the the initial requirement we have decided to use Click Once technology
but found many issues in the deployment. They are below
You will need to sign a Click Once application with trusted certificate
otherwise it is blocked and instantly removed by Antivirus program.
ClickOnce may not be supported by all browsers , the behavior are different in IE and
other browser
ClickOnce to doesn't install components into the GAC , doesn't installed in the program
files rather it install and maintain user wise in the client machine.
ClickOnce has issue with proxy network and unable to customize the setup screen.
Community has faced many issues with ClickOnce Setup and does not have enough solution or
updates on Click Once technology solution
Do we have perfect deployment solution for window app over internet other than ClickOnce? Which methodology is widely used for window app deployment over internet?
Which deployment technology provide better success rate for easily maintenance and version update for the Window app over internet ?
You could build it as a standard executable and create an installer. A good way to make an installer is InnoSetup. However, the user has to have .Net Framework already installed.
As of Windows Vista, version 2.0 is included, Windows 7 includes 3.5, and Windows 8 includes 4.5. If you change the target .Net Framework of your application you can target these systems. Go to Properties > Target Framework > Choose 2.0, 3.5, or 4.5 (client profile if available).
As for updates, you should implement this in your application on your own or get another third-party updater. I don't know any good ones though.

ClickOnce check for update without executing app

I work in a service organization where users of our internal tools are often disconnected. It is often the case that service engineers on service assignments are "stranded" with an outdated version of some internal tool.
These tools are deployed using ClickOnce publish VS2010 .NET4 . If the users run all their apps while still connected to corporate network, they would get a notification that a new version was available. As the number of various tools increase, the chance increases that some app is not updated.
Is it possible to automate this process, by a batch file or something?
So that the engineers just need to run one file when connected to corporate nw to get all the newest versions of their installed tools?
Added:
An easier way of saying it would be to have "something like Windows update" operating on corporate net, but for internal ClickOnce apps.
Very interesting question. I can't think of a quick way to do this, but it's definitely possible.
I would create another ClickOnce app whose job is to update the other ClickOnce apps. This app needs the url of each app's .application file. If all engineers are supposed to have all apps, that's easy. If not, maybe you could look through their start menu and find all the ClickOnce Application Reference files. Those files contain the url.
Next, just launch the url and pass a query string argument...
http://server/MyApp/MyApp.application?UpdateOnly=true
In the startup of your applications, you can check the query string argument and shut down the app if it's run with UpdateOnly=true.
One side note. If you set the minimum required version of each of your apps to the latest version, users won't get prompted with the new version dialog. Seems like you'd want to do that or the user would still have to pay attention and do a lot of clicking.

How to add additional installer to start menu using ClickOnce

I have created a solution that comprise of a WPF application and a mobile device application. What I am trying to figure out is how to facilitate the installation of the mobile application.
When I publish and install the WPF desktop application it creates a start menu folder for the application. Optimally I would like to add the mobile application .msi to this menu but I'm not sure if this is supported by ClickOnce.
Any advice or guidance would be most hopeful.
I suggest looking at Inno Setup. Its a free installer for windows applications and has a simple scripting/wizard process. It'll provide this and all the normal installer functions (install location, start menu, desktop icon etc). It also provides an uninstaller