Debug a program that needs administrator rights under Windows 7

后端 未结 6 651
旧时难觅i
旧时难觅i 2020-12-29 07:19

I\'m running Visual Studio 2008 on Windows 7 64-bit. I\'m logged in as administrator, and I\'m running it as administrator, but the program I\'m working on fa

6条回答
  •  执念已碎
    2020-12-29 08:07

    I found the answer. It turns out that it is, in fact, a manifest issue: by default if you have a manifest you need to set the appropriate administrator privilege.

    The default is asInvoker, but that doesn't work if you need elevated privileges; you instead have to set it to requireAdministrator in the manifest properties.

提交回复
热议问题