forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
git-for-windows/build-extra
#580Description
- To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
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
- What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
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
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.
Metadata
Metadata
Assignees
Labels
No labels
Activity
installer: do not try to terminate/restart apps under /CLOSEAPPLICATIONS
dscho commentedon Nov 11, 2024
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 theinstaller
artifact, @obuolinis?dscho commentedon Nov 11, 2024
This is the URL for the
install-artifacts
artifact: https://github.com/git-for-windows/build-extra/actions/runs/11781878036/artifacts/2172074982obuolinis commentedon Nov 12, 2024
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 commentedon Nov 12, 2024
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?obuolinis commentedon Nov 16, 2024
Yes, I'm using /LOG as mentioned in the first post. However after running the test installer you provided I'm not able to find in the log any of the strings you linked. Furthermore there's no single mention of "RestartManager" at all.
For testing I first installed Git 2.40.1 x64 and opened "Git Bash", then ran the test installer with parameters
/VERYSILENT /NORESTART /FORCECLOSEAPPLICATIONS /LOG=C:\Windows\Logs\Software\Git-0-x64-Install.log
.Here are the files that the installer wasn't able to handle:
So
/FORCECLOSEAPPLICATIONS
isn't doing what it's supposed to do as you can see. My question is - how is the installer supposed to know what it needs to force-close? What you did with the test installer I think you just skipped the code that detects open apps and throws popups, therefore installer just proceeds regardless.obuolinis commentedon Nov 16, 2024
In the end we decided against trying to force-close any open Git processes as users may have important activities going on at the time when Git update gets triggered. We use PSADT framework as a wrapper which can present users a popup with a countdown asking to close certain offending apps/processes before executing the actual installer, and that's what we're going to do with Git.
There's only one problem - in some cases Git installer (with same install parameters as above) throws the following message and refuses to continue:
There are no applications in the list and it's not clear why that message was triggered. I wasn't able to reproduce such behavior myself. What's going on here? What am i missing?