Tip: To Disable Virtualization

Embedding Manifest to Disable Virtualization in Windows Vista

This will disable the virtualization for your application.

On a Vista machine, this manifest can be used for security requirements for an application. For example, on Vista, applications are not allowed to write into "Program Files" or Windows directories.

If requestedExecutionLevel is not set to true, the Registry and file virtualization will be turned on. The program will be writing to "Program Files," but it's really writing to C:\Users\<username>\AppData\Local\VirtualStore\Program Files. The Registry redirects HKEY_LOCAL_MACHINE\Software to HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\<Application Registry Keys>.

To disable the virtualization, you need to create a Manifest file and add the manifest file in the application build events. The Manifest file disables the virtualization in Vista for your application.

Right-click the project--> click the properties-->. On the left-side menu, you need to click the compile menu-->. In the Compile menu, you have this Build Events. When you click the build events, you will have a Post-build event command line; below that, you have a test box.

Here is the link for the manifest file: http://msdn.microsoft.com/en-us/library/bb545961.aspx.

uiAccess needs to be set to false and the level should be asinvoker.

<security>
   <requestedPrivileges>
      <requestedExecutionLevel level="AsInvoker" uiAccess="false"/>
   </requestedPrivileges>
</security>

Virtualization

Before adding the following line of code in that post build command line text box, you need to find the path of the MT.exe file. Usually, it will be in "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\MT.exe". Otherwise, please search and find the its path.

To build and embed the manifest file to connect to the application automatically, you need to add the following code in the post-build event of the application and keep this manifest file in the application path.

"Path of the MT.exe"
   -manifest "$(ProjectDir)[application name].exe.manifest"
   -outputresource:"$(TargetDir)$(TargetFileName)";#1


About the Author

Jeya Kumar

I am working as s Seniour software Engg. in L & T infotech.I am having 4+ years experience in windows and web development.

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

  • Live Event Date: September 16, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you starting an on-premise-to-cloud data migration project? Have you thought about how much space you might need for your online platform or how to handle data that might be related to users who no longer exist? If these questions or any other concerns have been plaguing you about your migration project, check out this eSeminar. Join our speakers Betsy Bilhorn, VP, Product Management at Scribe, Mike Virnig, PowerSucess Manager and Michele …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds