1.打开注册表 2.在注册表中删除Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\app.exe 3.再次编译运行,程序一切正常