<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-NZ" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">I think the Virtual Store redirection is not a Windows 10 “feature” – it’s been around since Vista and UAC was introduced.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Essentially, when attempting to copy to the Program Files folder from a non-elevated task, rather than giving an Access Denied error due to security restrictions (since normal users don’t have write access to
Program Files and it’s subfolders – only Administrators do), Windows silently redirects the copy to the Virtual Store instead. This was done for backwards compatibility with pre-UAC Windows since it allowed more apps to continue running rather than crashing.
<sigh><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">If you grant Full Control access rights to the Program Files sub-folder your application install into and runs from, you’ll avoid the redirection. You need to be running as an Administrator to do that so it’s
best to do this as part of our setup installer (which is usually running elevated) to allow for auto-updating.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> Paul.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-NZ">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-NZ"> delphi-bounces@listserver.123.net.nz [mailto:delphi-bounces@listserver.123.net.nz]
<b>On Behalf Of </b>Ian Fear<br>
<b>Sent:</b> Tuesday, 14 June 2016 9:37 a.m.<br>
<b>To:</b> 'NZ Borland Developers Group - Delphi List' <delphi@listserver.123.net.nz><br>
<b>Subject:</b> [DUG] Windows 10 file copying on surface 3<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">More than a few years ago one of our members wrote a utility we Called the UPGRADER {Steve}<o:p></o:p></p>
<p class="MsoNormal">This was used to move new versions of our Exe and associated bpls from a server Repository “current Version” to the appropriate folder on the users pc.<o:p></o:p></p>
<p class="MsoNormal">As the Program is seasonal the exe was renamed at the same time.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The exe checks its version compared to “currentVersion” one and if different creates an ini file with the required paths for the upgrader and closes.<o:p></o:p></p>
<p class="MsoNormal">The user the executes the upgrader and the new version is copied across to the appropriate path.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This has worked fine for more than 10 years.<o:p></o:p></p>
<p class="MsoNormal">But wait Win 10 in all its wisdom has decided to put the exe on the designated path but all the bpls are<o:p></o:p></p>
<p class="MsoNormal">Placed <a href="file:///\\eptb0007\c$\Users\debbie.roberts\AppData\Local\VirtualStore\Program">
C:\Users\username\AppData\Local\VirtualStore\Program</a> Files\programpath<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Of course as the bulk of the program is in the bpl the uses dont get the changes and if you remove the old bpls from the destination path windows is to stupid to know where it has put them<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We have identified the problem on Surface 3 devices but not yet had time to check it on all windows 10 PCs<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Anyone know if there is a way to force the copy to the correct destination??
<o:p></o:p></p>
<p class="MsoNormal">Or any other thoughts on how to overcome the issue<o:p></o:p></p>
<p class="MsoNormal">Currently compiled with Delphi XE2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance for any help<o:p></o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal">Ian<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">Ian Fear<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">B Agr Sc (Lincoln)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">GDip InfSys(Massey)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">Fear Consulting Ltd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">405 Old Taupo Road<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">Rotorua<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">Home /work 07 347 6015<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-NZ">Mobile 027 474 2772<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>