dongyi1777
dongyi1777
2017-01-17 18:07

32位Go Binary需要特权升级,而64位不需要

已采纳

Using GoLang 1.7.4, I was building a binary for my application with the target being windows/amd64, This binary built fine and when ran, did not cause a UAC prompt to appear for privilege escalation.

I switched to building the binary for windows/386, however when the binary is built it now requires privilege escalation, to make it even stranger, if I build the binary for windows/386 using a different name, it does not require escalated privileges to run, however as soon as I rename the binary to the name it is usually built as ( rename is done in Windows Explorer) , it suddenly requires escalated privileges again.

All this was being done on a Windows 10 64 bit machine, any ideas to what exactly is going on?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • doubu0897 doubu0897 4年前

    Turns out Windows automatically requires elevated privileges for apps depending on file name. It checks file names to see if there an installer, so files with names such as "Setup" or "Update" will be required to have elevated privledges on a 32 bit application.

    点赞 评论 复制链接分享

相关推荐