mirror of
https://github.com/clechasseur/pathcopycopy.git
synced 2026-04-25 12:15:58 +03:00
[GH-ISSUE #91] Upgrade is failing #90
Labels
No labels
bug
duplicate
enhancement
enhancement
enhancement
fixed
help wanted
help wanted
invalid
pull-request
question
waiting for input
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pathcopycopy#90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @teknowledgist on GitHub (Sep 11, 2019).
Original GitHub issue: https://github.com/clechasseur/pathcopycopy/issues/91
Originally assigned to: @clechasseur on GitHub.
Hi. The installer is failing (at least sometimes) on upgrade attempts. It kills explorer as it is supposed to and then hangs for a bit. In a manual upgrade, it gives an error about needing to stop the processes using PathCopyCopy (although I don't know what those would be if Explorer is down). In silent mode, it just returns an exit code of '5'.
My testing machine is down at the moment, but this occurred on my personal machine and at least one other.
Is there any way to upgrade without uninstalling and rebooting first?
Thanks
@clechasseur commented on GitHub (Sep 11, 2019):
I've had problems in the past asking the installer to shut down Explorer… Did you try upgrading but without shutting down Explorer via the installer? You'll have to reboot at the end, but it might work better...
@clechasseur commented on GitHub (Sep 11, 2019):
(For a silent install, you can instruct the installer not to shut down applications by passing
/NOCLOSEAPPLICATIONS.)@blackcrack commented on GitHub (Sep 11, 2019):
something named "Unattended Install switches"
for wiki:
Inno Setup Command Line Parameters
copy n'past:
best
Blacky
@BaWue commented on GitHub (Sep 11, 2019):
The following manual procedure allows to install an update of PathCopyCopy without the necessity of rebooting afterwards:
I am using this on an account with local admin rights (but not the Administrator account itself). Not shure if this also works on an account which is not member of "Administrators".
@clechasseur commented on GitHub (Sep 11, 2019):
Thanks for the input. I indeed have been planning a wiki section on advanced installation options, including command-line parameters. When this happens, you can check it out also to see if I forgot something.
@clechasseur commented on GitHub (Sep 11, 2019):
This indeed works but is a little bit convoluted. The installer's step to shut down and launch apps again afterwards should take care of this, but it seems buggy at the moment... I think I remember reading in Inno Setup's documentation that it uses a Windows API to implement this, so perhaps it's the API that's buggy.
It should, although you might see elevation prompts.
@teknowledgist commented on GitHub (Sep 12, 2019):
Hi. Thanks for all the feedback.
Note: I first tried the Chocolately package I'm maintaining which uses the
/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-switches. I didn't know about the/CLOSEAPPLICATIONS(or/NOCLOSEAPPLICATIONS) switch. I'll have to try that when I get a chance. I will also try @BaWue 's process but scripted.@clechasseur Question: Is the installer using a different method than the
/CLOSEAPPLICATIONSswitch uses? If not, then that should make no difference, right?@clechasseur commented on GitHub (Sep 12, 2019):
The installer lets the user decide whether to close applications or not. Not sure what your question mean though - here, we're trying to determine whether NOT closing the applications improves the stability of the update process. If it is determined that closing applications automatically via the installer causes issues, I can turn off this feature when building the installer.
@teknowledgist commented on GitHub (Sep 13, 2019):
What I'm trying to ask is...
When the user chooses to close Explorer in the GUI, does the installer use the same mechanism/call to close the Explorer program/process that the Inno setup uses if the
/CLOSEAPPLICATIONSswitch is used?If they are the same, then -- assuming the silent switches also use the same mechanism as the manual choice in the GUI -- there is no point in using
/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /CLOSEAPPLICATIONSbecause the process is already being attempted.Based on my experience with some other Chocolatey packages, it's pretty common for DLLs for shell extensions to be locked (and not replaceable) until Explorer is closed. I'd be fairly surprised if Path-Copy-Copy could be upgraded without closing Explorer.
I'll test when I get a chance.
@clechasseur commented on GitHub (Sep 13, 2019):
It is my understanding, although I have never verified this by reading Inno Setup's code.
I believe this is correct - furthermore, I believe that THIS is the reason it hangs during some updates. That's why I recommended you try using
/NOCLOSEAPPLICATIONSto see if it allows the upgrade to work.It can't, unless you reboot afterwards.
Let me know if you find a solution.
@clechasseur commented on GitHub (Sep 20, 2019):
@teknowledgist did you have the time to test this? Is there a workaround for the upgrade issue? If disabling the closing of external program works, I'd like to implement this officially in 17.x.
@blackcrack commented on GitHub (Sep 20, 2019):
@clechasseur
it's maybe better, i guess there have a "blacklist" of programs where search for before it install
like explorer-window or totalcommander to close this application for prevent the user to able to show what's happen or so.. ( i guess to be a "security" thing for programmers and do"
so, if this not need, .. , turn it off..
best
Blacky
@clechasseur commented on GitHub (Sep 20, 2019):
It's not a blacklist - there's a Windows API that the installer uses to get a list of running programs that are using any of the artifacts to be installed. That's the list the installer displays, offering you to shut the programs down.
@blackcrack commented on GitHub (Sep 20, 2019):
what i had already seen .. on an other program .. ehh open-shell .. as example :)
@teknowledgist commented on GitHub (Sep 23, 2019):
In various tests with a few different option but not the /NOCLOSEAPPLICATIONS, I was not able to find a pattern for when an upgrade failed. Sometimes it did, and sometimes it didn't. Sometimes it closed Explorer (or Xplorer2 lite - my other test app) and sometimes it didn't re-open it. If the machine was rebooted between the older install and the upgrade (as would likely always be the case), it seemed to be more likely to succeed, but not always.
I never had it fail when I used the /NOCLOSEAPPLICATIONS switch. Often, the new version was working even though it gave a required reboot exit message (using /RESTARTEXITCODE=3010).
IMO, it's better to succeed with the upgrade and give a notice of a need to reboot than fail the upgrade and make the user figure out how to make it work (i.e. uninstall first). All I would ask is that you return a "standard" reboot required exit code (if that is the case) for silent installs.
Thanks.
@clechasseur commented on GitHub (Sep 23, 2019):
I agree. I will thus disable the closing of applications by the installer. (This is the equivalent of always passing
/NOCLOSEAPPLICATIONSon the command-line.)As for the return code, I believe the best way to do this is to use
/RESTARTEXITCODE. Not all users calling setup from the command-line or in other ways would want a non-zero exit code in this case - it could fail scripts unexpectedly, etc. If you need to a standardized exit code, this switch should do it.@clechasseur commented on GitHub (Sep 29, 2019):
Starting with version 17.1, installer will no longer offer to close and restart applications. (This can be overridden on the command-line if needed.)