I think the Virtual Store redirection is not a Windows 10 "feature" - it's been around since Vista and UAC was introduced.
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> 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. Cheers, Paul. From: [email protected] [mailto:[email protected]] On Behalf Of Ian Fear Sent: Tuesday, 14 June 2016 9:37 a.m. To: 'NZ Borland Developers Group - Delphi List' <[email protected]> Subject: [DUG] Windows 10 file copying on surface 3 More than a few years ago one of our members wrote a utility we Called the UPGRADER {Steve} 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. As the Program is seasonal the exe was renamed at the same time. 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. The user the executes the upgrader and the new version is copied across to the appropriate path. This has worked fine for more than 10 years. But wait Win 10 in all its wisdom has decided to put the exe on the designated path but all the bpls are Placed C:\Users\username\AppData\Local\VirtualStore\Program<file:///\\eptb0007\c$\Users\debbie.roberts\AppData\Local\VirtualStore\Program> Files\programpath 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 We have identified the problem on Surface 3 devices but not yet had time to check it on all windows 10 PCs Anyone know if there is a way to force the copy to the correct destination?? Or any other thoughts on how to overcome the issue Currently compiled with Delphi XE2 Thanks in advance for any help Regards Ian Ian Fear B Agr Sc (Lincoln) GDip InfSys(Massey) Fear Consulting Ltd 405 Old Taupo Road Rotorua Home /work 07 347 6015 Mobile 027 474 2772
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: [email protected] Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [email protected] with Subject: unsubscribe
