PDA

View Full Version : Checking for compressed drives



NewsArchive
08-17-2010, 03:17 AM
A recent demo installation failed when MS SQL Server 2005 Express objected to
the user's (XP) compressed drive.

Is there a means by which I can test (in SB) for compressed drives in order to
inform the user and abort the installation?

Greg Fasolt

NewsArchive
08-17-2010, 03:17 AM
Greg,

> A recent demo installation failed when MS SQL Server 2005 Express objected
> to the user's (XP) compressed drive.
>
> Is there a means by which I can test (in SB) for compressed drives in
> order to inform the user and abort the installation?

I think the GetVolumeInformation Windows API can be used to check if a
volume is compressed. If it returns FILE_VOLUME_IS_COMPRESSED (8000h) then
the specified volume is a compressed volume, for example, a DoubleSpace
volume.

We'll check if it is possible to add something to the SB runtime to handle
this.

Friedrich

NewsArchive
08-17-2010, 03:17 AM
Thanks, Friedrich. This was something I didn't know I needed until itembarassed me.

Greg Fasolt

NewsArchive
08-17-2010, 03:18 AM
Greg,

> Thanks, Friedrich. This was something I didn't know I needed until
> itembarassed me.

We have added a new built-in option to handle this. The "Get System Info
(Volume System Name)" script function lets you retrieve the name of the file
system, for example, the FAT file system or the NTFS file system. In
addition to this, the %_SB_RETURN% variable holds a specific "flag"
associated with the specified file system now. This lets you check whether
the specified volume is a compressed volume.

Friedrich

NewsArchive
08-18-2010, 01:44 AM
BTW, the code to detect a compressed volume looks like this:

Set Variable %TEST% to FUNCTION:Get System Info(Volume System Name) for "C"
Set Variable %VOLUME_FLAG% to "%_SB_RETURN%"

If %VOLUME_FLAG% Bitwise AND "$FILE_VOLUME_IS_COMPRESSED$" Then
Display Message Box "FILE_VOLUME_IS_COMPRESSED" -- ""
End

Friedrich

NewsArchive
08-18-2010, 01:44 AM
Wonderful! Thanks.

Greg Fasolt