Skip to content

postinst runs after prerm when updating #74

@micheljung

Description

@micheljung

I haven't been able to create an minimal working example yet, but I'm close to it.

It seems to boil down to this:

msi {
  postinst = '''
set shell = CreateObject("WScript.Shell")
shell.LogEvent 4, "postinst executed"
'''
  prerm = '''
set shell = CreateObject("WScript.Shell")
shell.LogEvent 4, "prerm executed"
'''
}

The InstallExecuteSequence from the wxs file:

    <InstallExecuteSequence>
      <Custom Action="Postinst_Script0" Before="InstallFinalize">NOT Installed OR REINSTALL OR UPGRADINGPRODUCTCODE</Custom>
      <Custom Action="SetPropertiesPostinst_Script0" Before="Postinst_Script0"/>
      <Custom Action="Prerm_Script0" After="InstallInitialize">REMOVE</Custom>
      <Custom Action="SetPropertiesPrerm_Script0" Before="Prerm_Script0"/>
    </InstallExecuteSequence>

When you install, you get:

postinst executed

When you remove an installed version, you get:

prerm executed

When you install a new version over an existing one, you get:

prerm executed
postinst executed
postinst executed

Would you agree that this is a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions