Skip to content

Conversation

rquadling
Copy link
Contributor

Stop any registry based autoexec commands from executing when shelling.

Running Windows CMD as Administrator puts you in C:\windows\system32.

If you have a registry entry of ...

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="@CD C:\\"

Causes all sorts of issues without the /D option.

From CMD /?

/D      Disable execution of AutoRun commands from registry

If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

        and/or

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Stop any registry based autoexec commands from executing when shelling.

Running Windows CMD as Administrator puts you in C:\windows\system32.

If you have a registry entry of ...
```
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="@cd C:\\"
```

Causes all sorts of issues without the ```/D``` option.

From ```CMD /?```

```
/D      Disable execution of AutoRun commands from registry

If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

        and/or

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

```
@rquadling
Copy link
Contributor Author

Relates to/causes composer/composer#4427

@stof
Copy link
Member

stof commented Sep 16, 2015

should be applied in the 2.3 branch when merging, as this is a bugfix.
It is great to have a way to get rid of issues caused by AutoRun.

@stof
Copy link
Member

stof commented Sep 16, 2015

@rquadling this repo is the read-only subtree split of Symfony. Can you reopen a PR on the symfony/symfony repo instead (and on the 2.3 branch directly) ?

@rquadling
Copy link
Contributor Author

OK.

rquadling added a commit to rquadling/symfony that referenced this pull request Sep 16, 2015
Stop autoruns when shelling on Windows.

Original PR was on symfony/process#9 (comment).
@stof
Copy link
Member

stof commented Sep 16, 2015

@rquadling please close this PR in favor of the symfony one (I cannot do it for you as the core team does not have collaborator access on read-only repo as they are not meant to change)

@rquadling
Copy link
Contributor Author

Closing in favour of PR on main project.

@rquadling rquadling closed this Sep 16, 2015
Tobion added a commit to symfony/symfony that referenced this pull request Sep 18, 2015
…adling)

This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Stopped Autoruns when shelling on windows

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   |
| Fixed tickets |
| License       | MIT
| Doc PR        |

Stop autoruns when shelling on Windows.

Original PR was on symfony/process#9 (comment).

Commits
-------

bca6771 Update Process.php
symfony-splitter pushed a commit that referenced this pull request Sep 18, 2015
Stop autoruns when shelling on Windows.

Original PR was on #9 (comment).
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.

2 participants