jing
jing

Reputation: 2021

Windows-Installer: How to unpack application into TempFolder, run it and delete it?

I have own installation procedure InstallInit.exe. I need to include it into MSI installer, so the windows-installer will:

  1. Unpack my InstallInit.exe into Temp Folder
  2. Launch [Temp Folder]\InstallInit.exe /withargumets
  3. Delete [Temp Folder]\InstallInit.exe

Do you have any tips how to do it? I know only how to do the step 2 (through Custom Actions).

Note1: I am using VS2010 to create the installer.

Note2: I am OK also with another folder (i.e. target dir in Program Files). This would solve #1. I just need to delete the InstallInit.exe after installation finished.

Upvotes: 0

Views: 1086

Answers (2)

Hangman_1966
Hangman_1966

Reputation: 186

(1) Put the InstallInit.exe into Binary-Table
(2) Create a CustomAction for unpack
(3) Create a CustomAction for Launch
(4) Change RemoveFile-Table - add InstallInit.exe (InstallMode = 1)

Upvotes: 1

smirkingman
smirkingman

Reputation: 6368

As part of your solution, create a program which performs steps 1-3 and call THAT program as a Custom Action

Upvotes: 0

Related Questions