NSIS automatic and silent update - windows

I am currently building an application and want to have an installer and automatic silent updates for it.
Dropbox, Spotify and Chrome all are amazing at updating without anyone noticing. So I took a look at the Dropbox Roaming Folder in AppData and found a file named DropboxUpdateHelper.exe with an NSIS Icon. In the Spotify folder I could only find a SpotifyHelper.exe and a mentioning of NSIS in the Terms.
Is there a tutorial of how to install an application inside the Roaming Folder and have a silent auto updater? I am not fixed on NSIS but would prefer an open source and free installer.

NSIS has the INetC plugin that can be used to download things from the internet but I don't know if there is an auto update tutorial out there. You might also want to take a look at the VPatch plugin...
There are many variables to think about here:
Should your main application look for updates or just run the updater on application (or windows) startup so it can check?
Are the files on the server signed or do you have other ways to detect invalid/corrupted/MitM updates?
Do you require access control/DRM before downloading/applying updates?
How will you handle major version number updates? Will you support more than one major version or force upgrades?
Do you require administrator rights to update? UAC handling?
How are you going to support upgrading from 1.0 to 1.2? Update to 1.1 first or support every possible minor version upgrade path?
I'm sure there are many other issues you also have to think about. You should probably try to answer all these questions before you start coding. During development you might find other questions or that you have to change the design completely.
IMHO, this is not a simple question and I don't think you will be able to find a drop-in solution that fits your exact design/requirements...

It is easy to download files from internet using NSIS (there are several plug-ins for this purpose: NSISdl, InetC, ...) but such functionality is more about coding.
There is no exact solution for this - as Anders said you need to specify every detail to achieve required behaviour.

Related

Is it possible to update MSIX packages via appinstaller pushed by Intune

Context:
We want to force the installation of new versions of our MSIX bundled apps. Because of risk of data loss, we don't want to force close them but give users the option to save their work and install the update. Sometimes critical updates happen and we want to update the app ASAP (not wait until next morning).
The solution we have thought of is, using Intune to distribute .appinstaller files, which then will be in charge of installing and updating the app, using the built-in updating system.
Uploading a .appinstaller file via the portal is not supported (AFAIK)
Questions:
Is it possible to distribute .appinstaller files via Intune
Can you schedule app updates in Intune
Is it possible to gracefully close the app in stead of forcing it
Are we looking at it all wrong and are there better ways for facilitating our use case
Thank you for any help in advance!
This is a partial answer that focuses on questions 2 and 3. I am mostly using Azure as opposed to Intune, so I have no idea how to distribute it via Intune. Anyways, you can add a Package.appinstaller file to your MSIX project and specify both what schedule you want to have to update and to allow the user to save their data before the application shuts down and updates. The cool thing here is that this all seems to be handled through configurations as opposed to any code changes. For more information, see the two comprehensive resources that I found useful for one of my questions.
The link below really explains the answer for questions 2 and 3.
http://thewindowsupdate.com/2019/02/22/handling-application-updates-with-app-installer-and-msix-in-windows-10-19h1/
The link below explains some of the context too the answer above as it relates specifically to the version of Windows that is being targeted. This is relevant because if you target a lower version of Windows, then these features and configurations will not work.
https://learn.microsoft.com/en-us/windows/msix/app-installer/update-settings

ClickOnce/Excel-VSTO under Windows 7

We have developed a .Net 4.0 VSTO Excel AddIn in VS2010 that we are deploying via ClickOnce. Our deployable seems fine on Windows XP but is extremely problematic when installed on Windows 7. The problems all seem to relate to when the AddIn needs to be removed via Excel (i.e. it has been soft deleted by Excel [eg. due to failure, etc] and it is then 'Remove'd by the user via the Excel | Options | AddIns | Manage | COM AddIns dialog.
The above leads to a situation where an AddIn is re-installed after the above has occurred, it is not exposed within Excel - i.e. the Excel AddIns tab (which would normally appear if there is one or more AddIns installed) vanishes forever. It becomes even more of a problem when we are developing/debugging, as we are renaming/removing AddIn instances on the fly - so much so that developing VSTO on Windows 7 is no longer feasible
Note that the AddIn is not in the hard deleted (disabled) list - it has been removed. I have tried installing/re-installing/uninstalling, rebooting, removing registry items (cleaning up cache/after-uninstall), removing file system files from C:\Documents and Settings\\Local Settings\Apps\2.0, clearing cache (via mage and/or rundll32 as per Clear the .NET-downloaded application cache without Mage?). There seems to be a clear difference of behaviour between XP and Windows 7.
Has anyone had similar problems ?
The only alternative I can see is a deployment project with a fully blown MSI, however this is no where near as neat - requires local Admin access, etc
Many thanks
Travis
Not sure if you have read about the tutorials about publishing Office solution using Clickonce. If you haven't, you can find them via the links below. Worth reading.
http://msdn.microsoft.com/en-us/library/vstudio/bb772100(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/vstudio/bb608591(v=vs.100).aspx
Regarding using windows installer, it's not extremely hard to do, especially with Visual Studio 2010 setup project. Here's a very detailed tutorial that can guide you through all these. It helped me a lot when I was trying to deploy the Excel add-in, and I hope it'd help you too in some way.
http://msdn.microsoft.com/en-us/library/ff937654.aspx
Also you might want to ask yourself these questions to determine whether or not using Clickonce/Windows installer is the right choice.
When it comes to your choice in deployment technologies, you don't
need to limit yourself to just one option. The key is to choose the
right tool for the right job. While there is no single rule or simple
answer, there are some general guidelines you can use to help make the
best decision for your specific needs.
Does the application install any COM components?
Does the application require registering any components for COM-Interop?
Does the application install any services? Does the application have to
install to a specific location or to the Global Assembly Cache (GAC)?
Does the application have any components that are conditionally
installed, based on the operating system or runtime environment?
Does the application require user input at installation time?
Does the application require configuration of system-level services such as
Active Directory or COM+?
After the application is installed, does it create files, write to the
registry, or affect the system in some way that would leave resources behind when the application is removed?
If you answered yes to any of
these questions, then Windows Installer is the best choice for
your needs. However, if you don't need to address the scenarios
described in the list above, then ClickOnce is an excellent candidate
for your deployment solution. If you want to leverage the distinct
benefits provided by ClickOnce, then understanding the capabilities of
ClickOnce early in your application design process is critical.
Deploying an early version of an application with ClickOnce, but then
belatedly realizing a need to move to Windows Installer, would create
a difficult upgrade path that can be avoided through careful up-front
planning.
From my experience, on one of my production projects we have also used MSI. And problems with click once were avoided. So my answer - yes you need to have MSI Project or MSI installations. And with MSI installations you can either use default MSI Project or external, e.g. Wix or Wise Installer or something else. Second way with custom installer is much more harder.
For situations with removing I've used mage and manual delete add-in from cache and registry. It helps, but looks like hacks.
Also each time when dealing with VSTO ClickOnce unclear, I've thought to use some external libraries. Unfortunately I haven't such opportunity to use something 3rd party to make my work easier due to requirement to project. But you can check and try. May be Add-in-Express libraries will help you, especially when they have good technical support.
What we found was that the way to get ClickOnce working for VSTO on Windows 7 was to do this within Excel - i.e.
Add/Remove Programs : uninstall
Excel | Options | AddIns | COM | Go
Add | browse to the ClickOnce setup.exe | OK | etc
Close down Excel
Go into Excel
AddIn appears
I'm sure you can play with the Add/Remove programs uninstall (versioning) so the user doesn't necessarily have to manually uninstall
ClickOnce is gr8 when it works - it's journey to get there tho and needs to be tightened up big style

Windows Logo clean uninstall

Anybody knows a way to cleanly uninstall a program that stores its settings on the per-user basis and installs for all users? I mean only the way to completely following the all Logo (Vista, 7, 8 - Server and Desktop) requirements.
I have found no way but installing a program on per-user basis, which in general can't be the solution.
Maybe leave some .cmd files in each user's home folder for cleaning-up application data?
The Logo requirements contains a lot of contradictions, and precisely following them seems to be impossible.
David Walker in his great comment to What do I do with per-user data when I uninstall? mentions:
Some users prefer that an uninstall would do a complete cleanup of all traces of a program.
Other users wish that a later reinstall would not force them to re-customize their settings.
These two wishes are incompatible.
Which one Microsoft recommends, actually, to pass all their Logo Certification tests? I mean all of them - from Vista to 8, both Server and Desktop.
Here's Raymond Chen's unofficial personal recommendation.
No. Let the data go.

Windows installer to install browser-extensions

I'm trying to create an installer for windows (and potentially mac) that can install a browser extension for chrome, firefox, and for IE, and I'm totally stuck. Primarily I live in web-development land and I don't even really know where to start. This installer might eventually also include something like a bing toolbar for a kickback to us on a per-install basis. I'm hoping for something that doesn't require us to learn how to author a windows installer, but if that is unavoidable what are some good services / apps we could use?
Any help, would be GREATLY appreciated.
Firefox: https://developer.mozilla.org/en/Adding_Extensions_using_the_Windows_Registry
Chrome: http://code.google.com/chrome/extensions/external_extensions.html#registry
The WiX toolkit and community may be a good place to start wrt IE.
I presume that you are imagining something like LastPass's installer
For Windows there is probably not much you can do to avoid using Windows Installer, therefore I recommend that you take a look at Wix, which is an open source toolset from Microsoft for generating installers that will shield you from a lot of problems.
I don't have any first hand experience with installing browser plugins but I am guessing that installing your plugins isn't all that different from installing a regular program - you need to place a bunch of files and set some registry keys and so on. What registry keys and so on should be documented by the browser developer (and you probably already know this since you have done your plugins).
Unfortunately, I cannot help you when it comes to the Mac.

Add registration dialog to PackageMaker

I'm currently in the process of writing a Mac PackageMaker-based installer for an application that I had previously distributed for Windows using an NSIS installer.
In NSIS, I was able to create a customized dialog that allowed the user to enter their serial number and license key before being allowed to install the program.
In PackageMaker, I can't really see anyway to add a custom dialog short of writing an little GUI app that is called by PackageMaker as a requirement. If this is the only way to do what I want, can anyone direct me to a resource that would explain how to do that?
If there is a another way, I'd also love to hear about that too.
(I know this question is similar but seems to deal more with editing the existing PackageMaker screens.)
PackageMaker supports plug-ins which can be added at any step of the installation. What you should do is write a plug-in which shows your license key prompt, and then load this plug-in at a step in the installation (say, the License step).
Here's an example of such a plug-in:
http://lists.apple.com/archives/Installer-dev/2008/Feb/msg00076.html
Personally, I'd recommend that you spare yourself the headache, and not use PackageMaker to make your Mac installer, but rather, an alternative tool, like Iceberg, and save yourself the trouble of tons of bugs.
If you insist on using PackageMaker, you should read this guide first to be ready for the many problems you may encounter:
(couldn't post this link because SO didn't let me, since I'm a first-time poster, but Google "PackageMaker workarounds" and it's the third result.
Apple's InstallerPluginSample sample code demonstrates how to add a registration pane to a PackageMaker-created installer.
I would recommend putting the license dialog in the application rather than in the installer. I haven't ever seen a Mac app that requests a license key during the install. They all do it when you launch the app.

Resources