Skip to content

Update path to netsh i Windows#15

Closed
hetlelid wants to merge 1 commit intofosrl:mainfrom
hetlelid:patch-1
Closed

Update path to netsh i Windows#15
hetlelid wants to merge 1 commit intofosrl:mainfrom
hetlelid:patch-1

Conversation

@hetlelid
Copy link

Win11 reporting:
"ERROR: 2025/08/26 09:38:55 Failed to configure interface: netsh command failed: exec: "netsh": cannot run executable found relative to current directory, output:"

--
Ref:
indicates a security measure implemented in Go 1.19 and later versions, affecting how executables are resolved via the system's PATH environment variable. Specifically, the os/exec package in Go will no longer resolve a program using an implicit or explicit path entry relative to the current directory (e.g., ./go on Unix or .\go.exe on Windows), even if the PATH is configured to allow it.

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

How to test?

Win11 reporting:
ERROR: 2025/08/26 09:38:55 Failed to configure interface: netsh command failed: exec: "netsh": cannot run executable found relative to current directory, output:
--
Ref: 
indicates a security measure implemented in Go 1.19 and later versions, affecting how executables are resolved via the system's PATH environment variable. Specifically, the os/exec package in Go will no longer resolve a program using an implicit or explicit path entry relative to the current directory (e.g., ./go on Unix or .\go.exe on Windows), even if the PATH is configured to allow it.
@hetlelid
Copy link
Author

This is probably not needed. The problem was that PATH dit not contain "C:\Windows\System32". Added this to path and now it's working.
Could it be that olm overwrite the PATH in the beginning? Because i found 3 occurance of "C:\Program Files\olm"

@oschwartz10612
Copy link
Member

Hum the installer does add olm to the path so you can run it anywhere. I am wondering if that screwed something up?

Either way being explicit about where to find it cant hurt I think right?

@hetlelid
Copy link
Author

I agree. Please cancel this patch

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