windows: executable with "update" in filename requires admin rights on Windows, regardless of Go version or build environment #68523
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Go version
go1.20.14.windows、go1.22.3.windows and so on
Output of
go env
in your module/workspace:What did you do?
I've encountered an unusual issue while developing with Go on Windows systems. When I compile a very simple program, if the resulting executable's filename contains the word "update", it requires administrator privileges to run. However, if I rename the same file, it runs normally without requiring elevated permissions.
Project structure:
The test project consists of only two files:
go.mod:
main.go:
What did you see happen?
Specific observations:
Using Process Monitor, I found that the program with "update" in its name performs these additional operations:
This behavior seems to be related to the Go runtime or compiler, as programs compiled with other languages (e.g., C#) don't exhibit this issue.
What did you expect to see?
Questions:
I appreciate any insights or guidance on this matter. Thank you for your time and attention.
The text was updated successfully, but these errors were encountered: