Skip to content

The system cannot find the path specified - executeShell fails when there's a invalid windows registry #10484

Open
@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

macoovacany reported this on 2021-11-04T13:59:40Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=22479

Description

Issue:
After downloading and installing a fresh dmd installation for a Windows machine, I tried running a basic dub build but it failed with the error:

"Failed to invoke the compiler c:\d\dmd\windows\bin\dmd.exe to determine the build platform:The system cannot find the path specified."

<note: I might have the compiler path wrong because I also tried an LDC install. The compiler error is from dub, https://github.com/dlang/dub/blob/master/source/dub/compilers/compiler.d Line 134 >

-----

Cause:
The windows registry key "HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun" had an invalid path. Removing the invalid value allowed dub to build correctly.

Refer https://stackoverflow.com/questions/33638281/what-is-the-reason-for-the-error-message-system-cannot-find-the-path-specified

------
Suggestion:
1) Provide documentation to this possible cause and fix. 
2) Perform a check in the phobos std.process.executeShell() if the system returns this error. 

OK to close this issue as fixed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions