Archive: Compressed NT-2k-XP subdirectory for large data file


Compressed NT-2k-XP subdirectory for large data file
My freeware app has a "niche" of obsolete, dinosaur equipment:

To get started, the current logic reads in a 4.1 mb plain text file. This can take quite a long time (10 seconds or even longer) to load/launch on the obsolete equipment described above.

I wanted to run some texts if a computer with WinNt/Win2000 would get started faster if the 4.1 mb text file was stored in a NTFS compressed subdirectory.

My quesiton: can a NSIS script detect which o/s the computer is using, and whether the destination drive was formated with NTFS? If so, can the script cause a compressed subdirectory to be created for the data file(s) to be stored?

C:\Program Files\MyApp <-- not compressed
C:\Program Files\MyApp\Data <-- compressed

According to MSDN:

To set a file's compression state, use the DeviceIoControl function with the FSCTL_SET_COMPRESSION operation.
I think it will just fail if the file system doesn't support it, but if you want to check the Windows version you can do so using one of the functions in the Archive or GetWindowsVersion in the documentation.