Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer parameters CLOSEAPPLICATIONS/FORCECLOSEAPPLICATIONS do not seem to have any impact #5250

Open
1 task done
obuolinis opened this issue Nov 11, 2024 · 4 comments · May be fixed by git-for-windows/build-extra#580

Comments

@obuolinis
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
Git-2.47.0.2-64-bit.exe installer
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.22631.4317]

Details

1. Have any Git version installed
2. Open Git GUI and/or Git Bash
3. Run installer with parameters: /VERYSILENT /NORESTART /FORCECLOSEAPPLICATIONS /LOG="C:\Windows\Logs\Software\Git-x64-Install.log"
  • What did you expect to occur after running these commands?

Expect the installer to force-close any open git-related apps and proceed with the installation

  • What actually happened instead?

If I run the above command as an administrative user, I receive a popup
Screenshot 2024-11-11 144909

If the installer gets executed via device management software, like SCCM or Intune (that is as SYSTEM account), the exact same message gets written into the log and the installer process is just hanging there indefinitely.

dscho added a commit to dscho/build-extra that referenced this issue Nov 11, 2024
When `/CLOSEAPPLICATIONS` or `/FORCECLOSEAPPLICATIONS` is passed to
InnoSetup, it will handle the closing/terminating of in-use apps, and we
do not have to do anything manually.

This fixes git-for-windows/git#5250

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member

dscho commented Nov 11, 2024

If I run the above command as an administrative user, I receive a popup

This error message is produced here.

I guess that this code should be skipped if /CLOSEAPPLICATIONS or /FORCECLOSEAPPLICATIONS is passed to the installer. I gave this a try in git-for-windows/build-extra#580. Once that PR build is done, would you mind testing the installer artifact, @obuolinis?

@dscho
Copy link
Member

dscho commented Nov 11, 2024

would you mind testing the installer artifact, @obuolinis?

This is the URL for the install-artifacts artifact: https://github.com/git-for-windows/build-extra/actions/runs/11781878036/artifacts/2172074982

@obuolinis
Copy link
Author

This is the URL for the install-artifacts artifact: https://github.com/git-for-windows/build-extra/actions/runs/11781878036/artifacts/2172074982

Just managed to test it, same command line. It kind of worked but not the way I'd expect it to.

First I installed v2.40.1 and opened Git GUI and Git Bash, then ran the test installer. No foreground apps were force-closed (wish.exe, mintty.exe), however the installer proceeded with the installation and when it was finished i could see that git version was now 2.47.0.2.
Then I noticed that the installer wasn't able to update certain executables and dlls that were in use - git-bash.exe, bash.exe, wish.exe, mintty.exe. The log said they would be updated after a reboot.

That's the behavior I'd expect from another install parameter - /NOCLOSEAPPLICATIONS, but not /CLOSEAPPLICATIONS or /FORCECLOSEAPPLICATIONS. So maybe you could explain what each parameter is supposed to do?

@dscho
Copy link
Member

dscho commented Nov 12, 2024

Then I noticed that the installer wasn't able to update certain executables and dlls that were in use - git-bash.exe, bash.exe, wish.exe, mintty.exe. The log said they would be updated after a reboot.

That's the behavior I'd expect from another install parameter - /NOCLOSEAPPLICATIONS, but not /CLOSEAPPLICATIONS or /FORCECLOSEAPPLICATIONS. So maybe you could explain what each parameter is supposed to do?

Hmm. I cannot really explain this behavior because this is not actually in Git for Windows' code, it is in InnoSetup's.

From what I can tell, the applications to close are registered here, and it looks straight-forward. So I have no idea why they are not force-closed.

However, I do see that there is plenty of logging going on. Have you tried to log to a file with /LOG=<filename> and looked for those tell-tales?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants