The MASM Forum

Miscellaneous => The Orphanage => Topic started by: jj2007 on February 02, 2018, 09:29:29 PM

Title: Files exist and occupy disk space but they don't show
Post by: jj2007 on February 02, 2018, 09:29:29 PM
I have a weird problem. The attached project is a standalone zipper using Jeff Glatt's DLL (https://www.codeproject.com/Articles/13370/LiteZip-and-LiteUnzip).

The good news: It works like a charm. Drag a bunch of files over it, and see it in action.

The bad news: When dragging e.g. C:\Program Files (x86)\Microsoft Office\OFFICE11\WINWORD.EXE over it, the proggie works just fine but... where is the archive?

OK, that folder is write-protected, fair enough. However,
- the program doesn't throw errors
- FindFirstFile("archive.zip") says it's there, and it even finds the exact and correct number of bytes (ca. 6MB for Winword)
- disk free space goes down by that amount
- I can open the file from within the proggie and read from it, and I see the PK marker
- but when launching the file with ShellExecute, I do not get an error but the external unzipper can't see the file content.

I have searched everywhere, the zip file can't be found. I've even done a chkdsk and a reboot, no errors. This is so weird ::)

When copying Winword.exe to a not-so-protected folder, and dragging it over LiteZipDll.exe, the archive is there and works.

There is also a simple workaround for the protected folder case: It works when creating the archive with GetTempPath. But I am not happy with the fact that when using a filename inside the protected folder, everything seems to work but the files are just not there :(

Has anybody run into something similar?

P.S.: There is a hilariously confused M$ thread about Can't Write to Program Files folder (https://social.technet.microsoft.com/Forums/windows/en-US/7b3ada32-181d-4c55-9259-ee44f5f83b82/cant-write-to-program-files-folder?forum=w8itprogeneral). Redmond, really, what a mess! And I don't have a problem with the fact that I can't create files there, but I do have a big problem with not telling me! Even MoveFileEx claims to have "succeeded". This is ridiculous, in particular since these non-existent files eat disk space :eusa_naughty:
Title: Re: Files exist and occupy disk space but they don't show
Post by: sinsi on February 03, 2018, 08:41:22 AM
Sounds like virtual store (https://www.pcmag.com/article2/0,2817,2325762,00.asp)
See if the zip is in C:\Users\username\AppData\Local\VirtualStore\...
Title: Re: Files exist and occupy disk space but they don't show
Post by: jj2007 on February 03, 2018, 09:17:10 AM
You saved my day, sinsi :t
Title: Re: Files exist and occupy disk space but they don't show
Post by: felipe on February 04, 2018, 10:35:49 AM
 :biggrin: Glad to see you happy.
Title: Re: Files exist and occupy disk space but they don't show
Post by: daydreamer on February 04, 2018, 10:21:56 PM
also had that trouble with running BG on new system,by default it installs and have all kind of save files in program files folder, so I had to reinstall it to some other place to make it work with new windows