Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic program update and Windows 7

We have a suite of programs that check for new versions at startup, and then download new versions to run if required. This is obviously a problem in Windows 7, when it is locked down as a 'standard user', as they can't write to the c:\program files directory and below. Anyone seen a example of an application that gets around with issue ?

Our applications are written in Delphi, but an example in any language would be useful.

Thanks in advance

Update:

We already have a system for determing whether a new version exists, the only problem is the download and install (if required), as this requires elevation. I can't think of a way that doesn't require an elevation prompt, or our users to reduce their security settings.

Update 2 :

I've asked a subsequent question, rather than adding a new one here

like image 805
mmmm Avatar asked Mar 05 '10 15:03

mmmm


People also ask

Does Windows 7 have automatic updates?

The Automatic Updates feature is included with Windows 7, Windows Vista and Windows XP. With the Automatic Updates feature, Windows can automatically keep the computer up to date with the latest updates and enhancements.

How do I turn off Windows 7 Automatic updates?

On the Microsoft Update site, click Change Settings. Scroll down the page, click to select the Disable Microsoft Update software and let me use Windows Update only check box, and then click Apply changes now.

Are Windows 7 updates still available 2021?

After January 14, 2020, if your PC is running Windows 7 and you have not purchased Extended Security Updates, the computer will no longer receive security updates. Organizations can purchase ESU at any time during the three years that the offer is available (2020, 2021, and 2022).


2 Answers

There are two options for application installation:

  1. Application is available for all users: installation or update requires elevation for Windows Vista and up
  2. The application is available for one user: install or update the application in the user profile in %LOCALAPPDATA%, no elevation is required

Ad 2: Google Chrome does this. It installs the .exe here:

%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe

--jeroen

like image 146
Jeroen Wiert Pluimers Avatar answered Sep 17 '22 17:09

Jeroen Wiert Pluimers


Typically what you will see an application do if it needs to escalate permissions is something like this.

  1. Application determines if upgrade is needed
  2. Application launches an "updater" service that requires "Administrator" permissions
  3. Application updates itself with this updated
  4. Application re-starts

This is a pretty common scenario, especially since to update your own DLL you need to go to a secondary process anyway.

like image 33
Mitchel Sellers Avatar answered Sep 21 '22 17:09

Mitchel Sellers