Drag and Drop stuck if not from desktop to desktop

Discussions related to using VirtualBox on Windows hosts.
Post Reply
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Drag and Drop stuck if not from desktop to desktop

Post by science2002 »

I know that drag 'n drop (DnD) shows problems.
Mine is the following (DnD is made bidirectional):
1. If I DnD from Host Desktop to Guest Desktop it works.
2. If I DnD from a different Host folder to Guest Desktop (or any other folder) it doesn't work.
3. If I DnD from Host Desktop to any other Guest folder that is not the Desktop (for instance a folder placed in the desktop) it doesn't work.

In case 2 and 3 I have noticed the following in the Guest OS:
a) DnD does not work since then. Moreover one cannot operate with the click of the mouse on the folders (This latter feature, but not the former, works again after restarting Windows explorer in the Guest OS)
b) the DnD file is available in the Guest machine under the Temp folder, and precisely inside the folder ....Temp/VirtualBox Dropped Files. In fact when DnD is performed one sees correctly the "+ Copy" label, while performing the action. The file however is stuck in the "Temp" folder (i.e. it did not move where it should) and after DnD problem a) arises.

Does someone come across to the same problem? Is there a possible solution to make DnD work better?
Thank you.

Specs:
VB 6.1 latest with VB Additions
Host: Win10 20H1
Guest: Win10 LTSC 2019
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Drag and Drop stuck if not from desktop to desktop

Post by mpack »

science2002 wrote: 1. If I DnD from Host Desktop to Guest Desktop it works.
2. If I DnD from a different Host folder to Guest Desktop (or any other folder) it doesn't work.
That is not the result I get - both work for me.

I checked it even though the report doesn't make sense to me: your desktop is just a different (icon) view of an ordinary disk folder, e.g. "C:\Users\science2002\Desktop", and whether you drag from one form of presentation or the other, you are still in both cases running "explorer", the Windows shell. So you're saying that DnD works with explorer but doesn't work with explorer, on the same folder.

I think the plain fact is that drag and drop has always been flakey, and once it gets stuck on an uncompleted task (it seems to be more likely on larger files) it will continue to fail no matter what you try it with. I think you'd be better off just turning the feature off, and use shared folders to get files in and out of the VM. AFAIK GA shared folders are completely reliable for this task.
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Re: Drag and Drop stuck if not from desktop to desktop

Post by science2002 »

Thanks mpack for your reply.
As probably most people would say - the present writer included - Drag and Drop (DnD) is a very useful feature: above all when one needs to move occasionally some files back and forth from different folders.

I found a sort of culprit, that at least in my case seems to work.

A) When the Guest OS is stuck with DnD, killing and re-starting VBoxTray.exe remakes DnD "work" again with the limitations (Desktop to Desktop) already mentioned. Sometimes they can be violated (i.e. making DnD work outside the desktop) if the file that is copied has a short name. Otherwise one can recover the dropped file looking at the VB Dropped Files, as mentioned in the open post, while the Guest OS works now again.

B) If one kills VBoxTray.exe (that by default is the one placed inside System32 folder) and restarts with the one that is placed here" C:\Program Files\Oracle\VirtualBox Guest Additions\VBoxTray.exe" the limitations I mentioned in the open post disappear.

On B) I noticed that if I block the exe in system32 (by changing name for instance), the Guest OS does not start automatically VBoxTray.exe present in Guest Additions. One needs to do it manually. Probably by changing some settings this second exe could be made the default one so it autoruns.
Someone can suggest if and where this can be done within VB settings?
Another way is to change the autostart in the Guest registry, at this path:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
In any case, I am curious to know if other users with similar problems get the same benefit.
Last edited by science2002 on 16. Jan 2022, 11:38, edited 1 time in total.
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Re: Drag and Drop stuck if not from desktop to desktop

Post by science2002 »

Small update, after further testing.

In the registry the autostart of VBoxTray.exe is made using the variable %SystemRoot%.
I change it, at first, to %ProgramFiles% etc. as described in the previous post (one needs a converter to write hex, like OTconvertIt). And it seemed to work.
But noticing other autostarts, I change again to %windir%, instead of %SystemRoot%. And it seemed to work too.
It was strange enough.
I shut down and reopen VB again, and with different files to copy (before I was DnDing the same file), I was back "to square one". Probably after killing and restarting VBoxTray.exe several times, the DnD file was in the Temporary folder and the Guest OS, was able to make the extra step and placing it in the correct place. It seems this does not occur, unfortunately, if one changes continuously the DnD file.

So far then I could confirm that File (Windows) explorer.exe and VBoxTrack.exe do not communicate reliably. I made another test by using DnD with Total Commander 10 (even portable version) in the Guest machine (so no explorer.exe). Up to now it seems to work in any folder. It even gives a message box after the file has been copied ok.
Last edited by science2002 on 15. Jan 2022, 21:26, edited 2 times in total.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Drag and Drop stuck if not from desktop to desktop

Post by fth0 »

FWIW, both VBoxTray.exe files are supposed to be identical. If that's not the case, your installation is corrupted.
science2002
Posts: 36
Joined: 4. Jan 2021, 01:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win10, WinXP, Android

Re: Drag and Drop stuck if not from desktop to desktop

Post by science2002 »

Yes @ftho they are exactly the same, apart path folder.
The different behaviour was in fact - as I wrote - strange enough.

The truth seems that VboxTray and Win explorer do not marry well, and that is a pity. Another file explorer possibly could help. Using Total Commander (which is not built upon win explorer) seems so, but further testing is needed.
Post Reply