1

How to RUN SCRIPT or EXE before installation begins on msi? I am using Visual Studio 2010's setup project.

I want to have the script or exe run, to exit the previous version of my application. I was looking on the CUSTOM ACTION but the exe will only run after the installation was completed.

Is there a way that the custom action will run before the installation happens?

  • yes i need help in this, because when run msi it first copied all files to target directory and then start Install custom action. so i need take back up of web.config before msi start copying... means With customs actions seems to be impossible since they are executed after the MSI wizard forms are showed.! – Muhammad Mubashir Apr 03 '13 at 12:15

1 Answers1

0

One approach would be to write another project, maybe just as console application and there execute the EXE and after this starting the MSI package. But I don't know if that satisfies you.

Grochni
  • 1,663
  • 20
  • 25
  • And how exactly would you do that? – luchosrock Sep 04 '13 at 19:57
  • I guess executing the EXE should be easy. For the MSI you can use WIX. It also offers the possibilities to install and uninstall MSIs programmatically or check if they are installed via the product code. For this part there has already been [another question](http://stackoverflow.com/questions/5764868/programatically-installing-msi-packages) – Grochni Sep 06 '13 at 10:04