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: when spawning cmd, disable AutoRun #312

Conversation

dscho
Copy link
Member

@dscho dscho commented Oct 8, 2020

Some user setups have stale AutoRun registry entries (e.g. from a Miniconda installation). The symptom looks like this:

image

The idea is to pass the /D option to cmd.exe, to prevent such AutoRun entries from being attempted to run.

This addresses git-for-windows/git#2384.

As per the documentation, usually `AutoRun` steps specified via the
registry (e.g. `Software\Microsoft\Command Processor\AutoRun`) are run
when calling `cmd.exe`, unless the `/D` option is used:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cmd

This can lead to problems when we use `cmd.exe` for the benefit of
redirecting the output to a file: under certain circumstances it can
easily produce an error "The system cannot find the path specified."

Let's use the `/D` to address this problem.

This addresses git-for-windows/git#2384.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho merged commit 539465e into git-for-windows:main Oct 9, 2020
@dscho dscho deleted the avoid-AutoRun-when-spawning-cmd-from-the-installer branch October 9, 2020 05:59
dscho added a commit that referenced this pull request Oct 9, 2020
Git for Windows [can now be
installed](#312)
even with stale `AutoRun` registry entries (e.g. left-overs from a
Miniconda installation).

Signed-off-by: Johannes Schindelin <[email protected]>
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 this pull request may close these issues.

1 participant