I've got Windows 10 build 14393.447 on the Gues.
Host is windows 7 Pro
From Guest:
I can see shared folders (which I have Shared as v:\)
I can SEE files on that V: drive
But when I try to RUN an .exe it fails with no error.
I can create files on V:\ and also copy the file from v:\
If I run it as Admin I get: specified path does not exist. check the path, and then try again.
Uninstalled & reinstalled VM Guest Additions
I disconnected the Shared network folder and reconnected it.
Virtual Box is up to date (just installed latest version today)
No luck.
Shared Folders work but can't run .exe on them
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Shared Folders work but can't run .exe on them
This is part of a how-to I've been meaning to post for some time, still unfinished, but the following passage should apply in your case.
Note 1: If you run your executable from a VirtualBox share that is not mapped (does not a drive letter assigned), you get the following error:
Solution 2: Copy the whole executable sub-directory in the VM.
Explanation
When a user connects to a network share, Windows tries to connect with two sets of credentials. This fails due to the UAC control. This is done so by design. For references and further reading on previous reports and the reasoning behind it (read especially the Microsoft links):
Note 1: If you run your executable from a VirtualBox share that is not mapped (does not a drive letter assigned), you get the following error:
Unable to assign a drive letter to the script path \\VBoxSvr\Share\Executable
W:\Share\Executable.exe The specified path does not exist. Check the path and then try again.
Solution 2: Copy the whole executable sub-directory in the VM.
Explanation
When a user connects to a network share, Windows tries to connect with two sets of credentials. This fails due to the UAC control. This is done so by design. For references and further reading on previous reports and the reasoning behind it (read especially the Microsoft links):
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Shared Folders work but can't run .exe on them
FWIW, if you're trying to run the exe using a Guest Additions Shared Folder, know that Guest Additions Shared Folders are really just for file copying between the host and the guest, not for running programs, databases, etc. like a real shared folder can do.
-
- Posts: 1
- Joined: 4. Oct 2021, 08:37
Re: Shared Folders work but can't run .exe on them
I know it's an old post but I wanted to add a solution/workaround for anyone searching for this (like I just did).
You can make a symlink to the directory then run it as if it were native to your virtual machine.
For Windows, open CMD as administrator and travel to the location you'd like to "place" the installer (i.e. desktop = `cd /users/<username>/desktop`). Then make a directory symlink like so:
Just remember to enclose paths that have spaces inside quotation marks like above.
No more copying!!!
You can make a symlink to the directory then run it as if it were native to your virtual machine.
For Windows, open CMD as administrator and travel to the location you'd like to "place" the installer (i.e. desktop = `cd /users/<username>/desktop`). Then make a directory symlink like so:
Code: Select all
mklink /d TempDir "Z:\Path\To\Desired Folder"
No more copying!!!
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Shared Folders work but can't run .exe on them
Thanks, Casey, for the possible workaround!
I have not yet tried a situation where Virtualbox Shared Folders did not support something that regular shared folders supported. But I'll remember this and try it to see if it works.
FWIW I have also learned since my posts above that VSFs weren't specifically designed to be only for file copying. However, it seems that only file copying works all the time, and some other things stop working or don't work in a VSF where they do work in a real shared folder.
I have not yet tried a situation where Virtualbox Shared Folders did not support something that regular shared folders supported. But I'll remember this and try it to see if it works.
FWIW I have also learned since my posts above that VSFs weren't specifically designed to be only for file copying. However, it seems that only file copying works all the time, and some other things stop working or don't work in a VSF where they do work in a real shared folder.
-
- Posts: 11
- Joined: 9. Jan 2011, 17:20
- Primary OS: MS Windows other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows
Re: Shared Folders work but can't run .exe on them
I mentioned the issue with running programs from VB shared folders or "real" shares earlier.
viewtopic.php?t=97186
I read somewhere there were relvant changes in 6.1.22. As I was reluctant to update from VB 6.1.6 so far, but in the meantime I did the update to 6.1.50. Unfortunately I still have the issue.
I cannot run programs from VB shared folders nor can I do this from a "real" shared folder / network drive (via Windows "net use"). Also the symlink workaround suggested does not work. So, I wonder what I am doing wrong.
My use case ist to run VScode from different environments with same settings, this is the reason I am preferring the portable installation on a somehow shared location.
Any idea, any specific setting I did miss to consider?
Thanks in advance.
viewtopic.php?t=97186
I read somewhere there were relvant changes in 6.1.22. As I was reluctant to update from VB 6.1.6 so far, but in the meantime I did the update to 6.1.50. Unfortunately I still have the issue.
I cannot run programs from VB shared folders nor can I do this from a "real" shared folder / network drive (via Windows "net use"). Also the symlink workaround suggested does not work. So, I wonder what I am doing wrong.
My use case ist to run VScode from different environments with same settings, this is the reason I am preferring the portable installation on a somehow shared location.
Any idea, any specific setting I did miss to consider?
Thanks in advance.
-
- Volunteer
- Posts: 5690
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Shared Folders work but can't run .exe on them
Does it work if you use the UNC path instead of the drive mapping when running an executable?
-
- Posts: 11
- Joined: 9. Jan 2011, 17:20
- Primary OS: MS Windows other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows
Re: Shared Folders work but can't run .exe on them
Thanks for your thoughts.
Well, while I still have an issue running an .exe from a shared drive, I still think it is somewhat linked to the UNC problem.
I created an link on the desktop to the .exe. Wether I set execution folder to the UNC-path or the drive-mapped path makes no difference.
But I can make VSCode running from the VBox happen: VScode is normally started by a \bin\code.cmd anyway.
If I start this cmd I run into the problem with the command line trying to execute at the UNC path what is not supported by windows requiring user interaction. But this can be overcome by input redirection using a dummy text file.
Well, while I still have an issue running an .exe from a shared drive, I still think it is somewhat linked to the UNC problem.
I created an link on the desktop to the .exe. Wether I set execution folder to the UNC-path or the drive-mapped path makes no difference.
But I can make VSCode running from the VBox happen: VScode is normally started by a \bin\code.cmd anyway.
If I start this cmd I run into the problem with the command line trying to execute at the UNC path what is not supported by windows requiring user interaction. But this can be overcome by input redirection using a dummy text file.
-
- Posts: 2
- Joined: 2. Jul 2024, 18:30
Re: Shared Folders work but can't run .exe on them
This didn't work for me, but it did work when I made a link to the UNC path instead.