0

I have a virtualbox instance running with Windows 7 as the guest and macOS as the host. I'm sharing my coding directory bin to the guest and have access to it:

enter image description here

As you can see the share is in the network folder, but if I run the net share command the output is just the usual output:

>net share

Share name   Resource                        Remark

-------------------------------------------------------------------------------
C$           C:\                             Default share
IPC$                                         Remote IPC
ADMIN$       C:\Windows                      Remote Admin
The command completed successfully.


>

Another thing is that I have to pushd into the share in order to access it. Why is it that this share shows up under the network folder but I cannot see it in my net share command?

0

I figured this out. VirtualBox uses the system drive Z:\ as the shared drive. So if you (for example) wanted to enumerate all system drives and figure out which on was for VBox you could do so like this, using python:

def do_logical_drive_enum():
    discovered_drives = []
    drives = win32api.GetLogicalDriveStrings()
    drives = drives.split("\000")[:-1]
    for drive in drives:
        try:
            discovered_drives.append(win32api.GetVolumeInformation(drive))
        except:
            pass
    print discovered_drives

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.