Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 13 of 13 total
Thread Win 7 & virtualisation & EDB
Fri, Apr 9 2010 10:20 PMPermanent Link

Raul

Team Elevate Team Elevate

Peter,

>Scary stuff, because by what logic would Windows find the ini at the path that it was requested to look in, ignore >it, then look for the virtualized version?

Based on some testing i did while ago (it should still apply) it's actually quite straightforward and logical:

a. If application uses "UAC Virtualization" then it will use the copy from virtual store first and if not found there then from local path (e.g. Program Files\yourapp) - hence the virtual store always wins if UAC virtualization is enabled.  If there is no file in virtual store then it uses local one and if there is not one there either you get a appropriate error about file not found or such.

b. if UAC virtualization is disabled for the app then it will always ignore file in virtual store and use local copy. if there is no local copy then you get "file not found" type message even if virtual store has a file.

Note that once you give permissions to your app to write to Program Files or ProgramData it still is uac virtualized but since it can write to the local path it will not use the virtual store. However should a user run it who does not have access and they attemtp to write to it you end up with 2 files for them - one in virtual and one in local locations.

Solution is to disable the virtualization (preferred way is to include the manifest and make sure manifest includes the <security><requestedPrivileges><requestedExecutionLevel with proper attributes e.g. asInvoker is usually enough if file permissions are properly set).

Raul
Sat, Apr 10 2010 3:13 AMPermanent Link

Peter

Raul

I should have known that, but learning the hard way does have some advantages SmileThe problem appears to be the virtualised folder left over from an earlier installation, as the current manifest contains...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity type="win32" name="CompanyName" version="8" processorArchitecture="*"/>
 <dependency>
   <dependentAssembly>
     <assemblyIdentity type="win32"
      name="Microsoft.Windows.Common-Controls"
      version="6.0.0.0"
      publicKeyToken="6595b64144ccf1df"
      language="*" processorArchitecture="*"/>
   </dependentAssembly>
 </dependency>
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
   <security>
     <requestedPrivileges>
       <requestedExecutionLevel level="asInvoker"/>
       </requestedPrivileges>
   </security>
 </trustInfo>
 <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
   <application>
     <!--The ID below indicates application support for Windows Vista -->
     <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
     <!--The ID below indicates application support for Windows 7 -->
     <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
   </application>
 </compatibility>
</assembly>

..which I compile with a .rc file, using a copy of brcc32 that I copied to the same folder.

I have deleted the folder under C:\Users\...Virtual etc, and have run the new loader, and the virtualisation appears to be un-necessary now.

Regards

Peter
Sun, Apr 11 2010 12:33 AMPermanent Link

Raul

Team Elevate Team Elevate

> I should have known that, but learning the hard way does have some advantages SmileThe problem appears to be the virtualised folder left over from an earlier installation, as the current manifest contains...


This might mean that your manifest is for some reason not working properlyand app is still virtualized - if the virtualization is turned off then the app should never use the file in virtualstore (c;\users\...) - it should either use one from the local location or  result in the "file not found" error. Hence even if you have a old file left behind it should matter.

Easiest way to check that i found is in task manager Processes tab. With the app running do one of the following:
1. right-click on your app name and make sure the "UAC Virtualization" is not checked (no checkmark)
2. in View->Select Columns you can enable (check) the "User Account Control (UAC) Virtualization" and then a new column is shown for processes with the virtualization status of either enabled or disabled.

Raul
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image