i-net-software / i-net-software/SetupBuilder

postinst runs after prerm when updating

Open
#74 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
93
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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:
```

NOT Installed OR REINSTALL OR UPGRADINGPRODUCTCODE

REMOVE


```

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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the msi configuration and the generated InstallExecuteSequence shown in the report. Reproduce an upgrade over an existing installation and trace the Prerm_Script0 and Postinst_Script0 custom actions; done means prerm runs before postinst and postinst is emitted only once.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.