"BillD" <> wrote ...
> When you copy a file from a zip (integrated zip function) to any folder in
> c:\program files\ in order to replace a file, the copy fails and the
> target
> folder will be empty! You lose the files!
>
> reproduction steps:
> 1. suppose in c:\program files\app1\ you have these 3 files:
> file1.exe, file2.dll, file2.txt
> 2. suppose in your Documents folder you have a zip contains file1.exe,
> file2.dll, file2.txt
> 3. explorer the zip and copy the 3 files to c:\program files\app1\
> 4. give the UAC consent
> ... but the copy will fail and the whole app1 folder will be empty. COPY
> IS
> FAILED AND YOU LOSE OLD FILES.
Not repro.
When I tried these steps on my machine, I got a UAC prompt, then the files
were copied from the ZIP file to the C:\Program Files\apps1 directory, as
expected. I was logged in as a Standard User.
You're undoubtedly seeing a real issue on your machine - but it doesn't seem
to be the universal experience for all users. You might need to delineate
the specific conditions required to reproduce the problem: for example, the
user context in which the files where copied; the specific permissions which
had been applied to the original files; etc. You can use the "icacls"
command to get a precise listing of the file permissions in the
app1\directory, before and after you attempt to copy the ZIP files into it;
eg:
C:\Program Files>icacls .\app1 > C:\TEMP\app1acl.txt
C:\Program Files>icacls .\app1\* >> C:\TEMP\app1acl.txt
You could also use a tool like Process Monitor
(
http://www.microsoft.com/technet/sys...ssmonitor.mspx)
to see exactly why the original ZIP files are being deleted.
If you have a consistent repro scenario which can be repro'ed on a random
machine, then ... yeah, it should be reported to Microsoft. Data loss is
always serious, and should be taken seriously. Although it is also true
that the Program Files direcory is "special" on Vista, it has a very
specific set of permissions which prevent random manipulation of files. This
is "by design" and is a security measure to prevent hijacks or other abuses
(what if the zipp'ed file1.exe was a virus?). Applications which need to
update files under the Program Files directory should do so, by calling on
the Windows Installer Services, instead of doing direct file I/O. (Mind you,
I use at least one app, a fine product, which nevertheless distributes
updates as ZIP'ed files to be copied into the program directory. Bugger I've
written to that vendor, suggesting they use a more secure and Vista-friendly
update mechanism).
Regards,
--
Andrew McLaren
amclar (at) optusnet dot com dot au