QueryDosDevice

Tomasz Salacinski tsalacinski at gmail.com
Wed Oct 22 05:24:16 CDT 2008


Hello,

I was trying to find a solution for bug 5351 and I've found it.
When user is trying to install Visual Studio he gets a message:

Unable to find a volume for file extraction.  Please verify that you
have proper permissions.

The problem is, that when vcssetup.exe is running, it is using function
QueryDosDeviceW to query dos devices on the system and looks for device
with either "harddisk" or "ramdisk" in its name.

Because it fails, installation cannot proceed. It checks drives like
this:

QueryDosDevice for C:\ returns "\\drive_c" <-- no harddisk in the string
QueryDosDevice for D:\ returns "\\home\\something" <-- again, the same
QueryDosDevice for Z:\ returns "\\" <-- still the same

There are few possible solutions on how to fix this:

1) Rename drive_c to harddiskvolume1 - this could force users to install
applications again, but new wine version could just move the files to
the new directory on startup and change the configuration file for drive
C:\ to point to harddiskvolume1

2) Create a symlink to drive_c in wine directory and automatically
create drive D:\ which points to that symlink (which is very bad,
because user will have two drives that point to the same location).

3) Convert QueryDosDeviceW so that it will return always
"harddiskvolume1" when application asks for "c". This can, but doesn't
have to break some applications, though.

I've applied the second solution to WINE and Visual Studio continues to
install, but WINE should apply this automatically so these installers
could work out-of-the-box (AFAIK this bug applies to other applications
as well, such as MS Office - but I can't confirm that). Please tell me,
which solution is the best one (or if you have a different solution,
tell me). I need to have Visual Studio on Linux (otherwise I will have
to install Windows), and I can try to fix the problem. I can code in C,
but I need Visual Studio and C# for my school (yes, I know Monodevelop
but I need to have Visual Studio projects). Cheers.




More information about the wine-devel mailing list