0

I'm using VS2013 to create a setup project. i have two questions

  • Removing previous versions : ok i'm done with that (flag on remove previous version and change version number...) but is there a way to inform user that software is alredy installed and it will be replaced with a new version? message, pop up....

  • checkBox/radioButton Choices : is it possible to store user's choices into a file or show different pages if user selects one check box or another?

PhilDW
  • 20,260
  • 1
  • 18
  • 28
Giuly
  • 11
  • 1
    old studio's setup projects are Windows Installer modules with pre-made scripts and content. Manually creating them instead of using studio certainly would do that , but t's tedious: you have to form proper .xml files, use ORCA or similar editor, etc. Alternative is to use something like WiX Toolset (Windows Installer XML). It's a more powerful tool and installers for Studio and Office you see are made using it. WiX should have Visual Studio integration. – Swift - Friday Pie Jul 23 '18 at 07:33
  • ok thanks a lot ! i don't know ORCA but Wix was my other alternative too!!! :) do you know some examples in WIX already done in order to be faster? – Giuly Jul 23 '18 at 07:42

2 Answers2

0

It's up to you how to tell the user, that's a design decision you need to make for the software you're writing. Certainly a pop-up is one possible way to do this.

Saving user selection: again, you have several choices.

A local configuration file somewhere in %appdata%, most likely a file in a folder where the folder name is your packages name.

Or somewhere in HKCU\Software in the registry for per-user settings, which these sure appear to be. As with the file option, I'd create a subkey using the name of the package, and store configuration data within that subkey.

dgnuff
  • 3,195
  • 2
  • 18
  • 32
0
  1. There's no support for this in Visual Studio setup projects. Attempting to add this with Orca or any other tool is non-trivial. In addition, it's not particularly easy in WiX either. I suspect the reason is that most people understand that they are doing an upgrade and just want it to work. There is sometimes a technical issue also - in the UI sequence you can determine that an upgrade is taking place (and get the ProductCode of the older version) but then you need code to call MsiGetProductInfo (or equivalent) to get the name and version of that older version. However, the UI sequence isn't elevated and you can't always get that info, and you might be upgrading several older versions. You can't run code during the Visual Studio UI sequence anyway. So there are a number of reasons why the "you are upgrading this older version" is rare in Windows Installer based setups.

  2. Is basically the same the same type of question as these:

c# setup project get radio buttons value

c# Visual Studio Project Installer save data from Textbox into Textfile

PhilDW
  • 20,260
  • 1
  • 18
  • 28