Menu

#1516 7zip is finding mysterious archives.

open
nobody
None
5
2015-05-15
2015-05-13
Mikey
No

I’m in (Windows 7) directory C:\Program Files\Mikey.
I can’t create a file in this directory for some reason, however I can drag files into it (it brings up a message about requiring administrator privilege and I just hit enter, I’m sure no password is set to use Administrator privilege).
Command line to create a file in this directory...
======================================================
C:\Program Files\Mikey>echo mabwashere > mabwashere.txt
Access is denied.

======================================================
This is a directory listing...
======================================================
C:\Program Files\Mikey>dir
Volume in drive C has no label.
Volume Serial Number is 50ED-13C5

Directory of C:\Program Files\Mikey

12/05/2015 03:04 PM <DIR> .
12/05/2015 03:04 PM <DIR> ..
22/04/2014 09:13 PM 5,449 Back It All Up.bat
12/05/2015 02:53 PM 6,312 Back Up This Directory.bat
25/01/2015 05:28 PM 11 cmd.bat
19/03/2014 04:57 PM 2,288 GetTime.bat
4 File(s) 14,060 bytes
2 Dir(s) 20,072,747,008 bytes free

======================================================
When I run a 7zip command to zip the directory it works and finds my previous archives as well...
======================================================
C:\Program Files\Mikey>7z a -r abcde.7z "*"

7-Zip 9.38 beta Copyright (c) 1999-2014 Igor Pavlov 2015-01-03
Scanning

Creating archive abcde.7z

Compressing 20150512151130 Tue 12-05-2015 15+11+30.55.7z
Compressing 20150513130514 Wed 13-05-2015 13+05+14.26.7z
Compressing 20150513134824 Wed 13-05-2015 13+48+24.12.7z
Compressing abc.7z
Compressing abcd.7z
Compressing Back It All Up.bat
Compressing Back Up This Directory.bat
Compressing cmd.bat
Compressing GetTime.bat

Everything is Ok

Kernel Time = 0.015 = 33%
User Time = 0.046 = 100%
Process Time = 0.062 = 133% Virtual Memory = 13 MB
Global Time = 0.046 = 100% Physical Memory = 11 MB

======================================================
So...
7zip found files abc.7z and abcd.7z, which were my previous attempts at zipping this directory (exactly the same as abcde.7z which 7zip will find next time I run it). There are other archives there too with timestamps that were created via a batch script that I am developing which alerted me to this bug.
So two questions...
1. Where is my archive abcd.7z?
2. How did 7zip find it?
Note that a command to delete abcd.7z says file not found.

Discussion

  • Shell

    Shell - 2015-05-13

    Try dir /ah - display hidden files.

     
    • Mikey

      Mikey - 2015-05-14

      Just to ease your mind I've run the command for you along with the others again. Guess what...they're not hidden files!
      C:\Program Files\Mikey>dir /AH
      Volume in drive C has no label.
      Volume Serial Number is 50ED-13C5

      Directory of C:\Program Files\Mikey

      File Not Found

      C:\Program Files\Mikey>dir
      Volume in drive C has no label.
      Volume Serial Number is 50ED-13C5

      Directory of C:\Program Files\Mikey

      12/05/2015 03:04 PM <DIR> .
      12/05/2015 03:04 PM <DIR> ..
      22/04/2014 09:13 PM 5,449 Back It All Up.bat
      13/05/2015 03:30 PM 6,386 Back Up This Directory.bat
      25/01/2015 05:28 PM 11 cmd.bat
      19/03/2014 04:57 PM 2,288 GetTime.bat
      4 File(s) 14,134 bytes
      2 Dir(s) 19,733,721,088 bytes free

      C:\Program Files\Mikey>dir /AH
      Volume in drive C has no label.
      Volume Serial Number is 50ED-13C5

      Directory of C:\Program Files\Mikey

      File Not Found

      C:\Program Files\Mikey>7z a -r abcdef.7z "*"

      7-Zip 9.38 beta Copyright (c) 1999-2014 Igor Pavlov 2015-01-03
      Scanning

      Creating archive abcdef.7z

      Compressing 20150512151130 Tue 12-05-2015 15+11+30.55.7z
      Compressing 20150513130514 Wed 13-05-2015 13+05+14.26.7z
      Compressing 20150513134824 Wed 13-05-2015 13+48+24.12.7z
      Compressing abc.7z
      Compressing abcd.7z
      Compressing abcde.7z
      Compressing Back It All Up.bat
      Compressing Back Up This Directory.bat
      Compressing cmd.bat
      Compressing GetTime.bat

      Everything is Ok

      Kernel Time = 0.046 = 9%
      User Time = 0.062 = 12%
      Process Time = 0.109 = 21% Virtual Memory = 14 MB
      Global Time = 0.511 = 100% Physical Memory = 12 MB

      C:\Program Files\Mikey>

       
      • Shell

        Shell - 2015-05-14

        What attributes do they have inside archive? If dir doesn't display them, they should be either hidden or system.

        Try to find those files in 7-Zip File Manager. You will get even more technical information about the files by navigating from the \\.\ node (this usually requires admin privileges).

         

        Last edit: Shell 2015-05-14
        • Mikey

          Mikey - 2015-05-14

          Let's be clear about this...there are no hidden or system files in the directory (Mikey). It's one of the first things I checked and I would have said immediately that 7zip was creating hidden files if it was. However it wasn't. Nor is it creating system files.
          I have question 3 also now though...why do you think 7zip would create a hidden or system file?

          I can't find the files in 7-Zip file manager.

          I did search for the files in Windows Explorer. They're in C:\Users\Mikey\AppData\Local\VirtualStore\Program Files\Mikey. What they are doing there I have no idea, 7zip finds them though.

           
          • Shell

            Shell - 2015-05-14

            Ah, VirtualStore... I forgot about it.

            Everything is clear now. You have run 7-Zip without elevation. It tried to write directly to C:\Program Files\Mikey which is protected, so Explorer redirected the write to the virtual store. I don't know the exact mechanism, but one of the following must happen:
            - either 7-Zip uses Explorer to get the contents of the directory, so it finds virtualized files together with the ones you need
            - or Windows shows the virtualized files only to the application that created them - it should be 7z.exe.

             
            • Mikey

              Mikey - 2015-05-14

              I haven't googled VirtualStore yet so I still don't know anything about it.

              Is this a bug or not then? I think 7-Zip should just give an error like "Can't write file" rather than allow it to go to VirtualStore.
              My batch files are usually called from another directory and the archives get written there in normal use, just this time I called it from the Program Files directory and this mysterious stuff happens.

              I would still call it a bug. Note that my batch file doesn't find the archive after it's created in VirtualStore. Nor will most Windows users know what's going on.

               
              • Shell

                Shell - 2015-05-15

                Such behavior is by design starting from Windows Vista. However, 7-Zip can be made aware of this new approach - at least it can raise the UAC dialog in order to write to protected locations.

                 
  • Shell

    Shell - 2015-05-15

    As for this behavior being a bug or not - I don't know for sure. It might be a feature request, but, as far as I remember, Igor Pavlov has already been asked for implementing UAC support. Perhaps, some later version of 7-Zip will address the problem discussed here.

     

Log in to post a comment.