evildictaitor wrote:

troposphere wrote:

AndyC wrote:


The trick is to not make the updater require Admin rights (at least not initially).

The sequence of events should go:

  1. Initial process detects need to update.
  2. Updater is launched as standard user
  3. Initial process quits
  4. Updater uses COM elevation to create object with Administrative rights
  5. COM object updates files
  6. Control returns back to updater process
  7. Updater launches new version of initial process

If you don't want to use COM elevation, you could introduce a third process, but that is rather untidy and may lead to issues it you want Logo certification.



Oh, alright, now I see what you mean. 

But the only problem is that the updater program is already 99% written.  Does it have to be rewritten to use this COM Elevation method?

I humbly admit that I don't know much about COM beyond some of the most basic concepts of aquiring interface pointers and checking return values.


If you're lazy, just start another executable up which contains all of your administrative-only code (or the same executable with command-line options)




I think this is what I'll do.  But it's not due to laziness, it's due to the fact that the deadline is very near, and I know next to nothing about COM, and I don't have time to rewrite the whole updater.