0

I'm having installshield project and I several powershell custom actions. The scripts change the file system (extract zip files, copy files, install packages, etc). I wonder where in the install sequence should I put them?

I looked at the guilde here but they don't cover it.

I tried to put it in the execute sequence after "InstallInitialize" but that made my scripts behave weird (some of the cmdlets work and some don't).

Then I moved them to the UI sequence after "ExecuteAction" and that seems to be working fine but I read somewhere that I shouldn't put in the UI sequence any scripts that change the file system..

What is the right place?

Thanks

Noam
  • 1,640
  • 4
  • 26
  • 55

1 Answers1

1

Events that change the system should not be placed in the UI sequence, one reason is that there isn't anything preventing your user from skipping the UI sequence.

During the execute sequence, you cannot install another MSI package. Some installers may look like a .exe but have a bundled MSI. If your goal is to handle installing prerequisites, then you need to possibly use the InstallShield Suite/Advanced UI install. That has a method of managing multiple install prerequisites. I suspect that the problem you encounter is that some of those packages you try to install have imbedded MSI installs.

Daniel Lee
  • 674
  • 1
  • 9
  • 25
  • Thanks for the answer, perhaps you right about the packages, I will look into it, however one of my ps scripts only unzip a zip file and that script also doesn't seem to work when I insert it after InstallInitialize.. (but its working fine when I put it after ExecuteAction. Any ideas about this? – Noam Nov 21 '17 at 07:59
  • Since you're new with Windows installer and InstallShield I would not add any custom actions between InstallInitialize and InstallFinalize. The actions can behave differently in between these 2 standard actions and it's too much to go into here. If your custom action relies on the installed files being in place put it after the InstallFinalize. If your action needs to be run before the files are put in place put it before InstallInitialize. – Doc Nov 21 '17 at 12:46