问题
I've been looking around trying to figure out how to generate a manifest file for a c++ application for VS2017. I've seen some stuff for VS2010, and the only thing I've seen for VS2017 is this page on the MS site. However, actually generating the file wasn't clear. So what I did was:
- Go to project properties
- Go to
Configuration Properties > Manifest Tool > Embed Manifest
and set it toNo
. - Apply and build.
I now have an external file named filename.exe.manifest
next to my filename.exe
. I then added the following bold and italic info to the manifest which I got from disableWindowFiltering on the MS site (unfortunately, not a direct link as there are no anchors on the page):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings"> <disableWindowFiltering>true</disableWindowFiltering> </asmv3:windowsSettings> </asmv3:application> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel> </requestedPrivileges> </security> </trustInfo> </assembly>
Once done, I executed the application. It didn't seem to change the results. I still couldn't enumerate all of the windows using EnumWindows()
and EnumChildWindows()
. The process is also running under admin rights too.
Did I do something wrong?
来源:https://stackoverflow.com/questions/53330015/how-to-generate-a-manifest-file-for-vs-2017-for-a-c-project-and-be-sure-its-wo