开发者

Prevent UAC Virtualization?

开发者 https://www.devze.com 2023-01-05 14:48 出处:网络
I have a VB6 app that I\'ve been selling for over 12 years.Sometimes I have users that have a hard time getting the app to run.The data writes are going into /My Documents so nothing but the installat

I have a VB6 app that I've been selling for over 12 years. Sometimes I have users that have a hard time getting the app to run. The data writes are going into /My Documents so nothing but the installation files (EXE, etc.) are going into C:\Program Files (or C:\Program Files (x86)).

The fix to their problem is to start the app, even though it appears hung, then show the task manager, view processes, right-click my app's process and uncheck UAC Virtualization. Then I have them repair the installation and all is fine.

Why is my process getting put under UA开发者_如何转开发C Virtualization and how do I prevent this from occuring? I also use InstallShield 2010 Professional to create the installation, I'm not sure if it's related to the installer or the app itself.


To prevent virtualization, add a manifest to the application. Whether you say asInvoker or requireAdministrator, you won't get virtualization any more. I am guessing asInvoker will be better for you since the app works fine without elevating.

You can just put foo.exe.manifest in the same folder as the exe, or embed it, which has some tricky stuff like making the manifest a multiple of 4 bytes long. This question covers some gory details of embedding.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号