MSDN > Home page del forum > Visual C# General > Handling Installer Minor Revision Changes
Formula una domandaFormula una domanda
 

DomandaHandling Installer Minor Revision Changes

  • martedì 3 novembre 2009 22.13jp2msft Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    I'm constantly pushing out small updates at our company due to some minor unforseen piece of the puzzle that is discovered during the manufacturing process. My application may change from 2.1.0.5 to 2.1.0.7 because I need to read in "6 text characters including the a space" instead of 5 characters like I was told. {sigh!}

    Anyway, I rebuild my application, rebuild my Setup and Deployment project (also part solution), then go out to reinstall it on 5 to 10 machines.

    Being a minor revision, the Setup and Deployment project fails stating that the current version is newer (actually it isn't, but that's the message I get). So, to install the patch, I have to log the person out, log in as an Administrator, remove the current version, install the modified version, log out, and let the other person log back in.

    How can I catch this message box before it displays? I am already overriding the Installer class to allow me to install the application as an Administrator for user accounts with restricted access ...I just can't install because of the minor update.

    Before the install, I would like some code to check what version is actually shown in the Add/Remove Programs settings and compare that to the version I am about to install. If my version is a minor update or greater (String.Compare(strNewVersion, strOldVersion) > 0), display a custom message asking if I'd like that version removed before proceeding. If No, the installation aborts.

    Where is a good place to look for this? Would this involve heavy MSI editing in ORCA, or is this something I could handle in the Installer's constructor? Any tips or ideas? Is there a better forum or different website I should look into? Is this beyond the scope & capabilities of Visual Studio 2008's Setup and Deployment?

    Thanks,
    ~Joe

    Avoid Sears Home Improvement

Tutte le risposte