VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I've tried to do this by myself, but it's far beyond my skill level:

Is it possible to modify the MOUNT command so that it includes a -nowindir option? That would let you mount the C: (or any other) drive, but make the \WINDOWS directory invisible to DOSBox.

This might be useful - or it might be a waste of time. But I would certainly like to use something like this if it's at all possible.

Reply 1 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

not really, I guess. On modern Windows this is not that much of a problem unless the user uses Dosbox with admin rights. It's still better to teach users not to do that, though 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 11, by dr_st

User metadata
Rank l33t
Rank
l33t
emendelson wrote:

Is it possible to modify the MOUNT command so that it includes a -nowindir option? That would let you mount the C: (or any other) drive, but make the \WINDOWS directory invisible to DOSBox.

You'd also want to make sure to hide Program Files (32 and 64 bit versions), ProgramData, Users and all the symbolic links / junction points, as accidentally screwing them up can screw up the system.

And for what? Just so that you can be lazy and messy and not put all the things that DOSBox should see in a separate directory?

It is a waste of time, and I agree with Dominus - it's better to teach users not to do it.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 4 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

BUT a good idea that comes from that:
DOSBox detects that it is mounting the root of a drive (which is easy) and injeccts a warning, right?
Instead of printing the warning, don't execute the mount command when this is detected (with a text explaining why).

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 5 of 11, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

DOSBox detects that it is mounting the root of a drive (which is easy) and injeccts a warning, right?
Instead of printing the warning, don't execute the mount command when this is detected (with a text explaining why).

Yes - but if that gets into the code, there should be an option to disable it. For example, the project I'm working on has a conf file that automatically mounts all drives other than C: (I think I'm going to change that so it automatically mounts all drives that do NOT have a \WINDOWS directory). I want it to mount drives D:, E:, and my SUBST-style drives K:, L:, and M:...

Reply 6 of 11, by dr_st

User metadata
Rank l33t
Rank
l33t

Yeah, I agree. It needs to be controllable, or at least detect that it is mounting the root of the system drive (not any drive). I can, in principle, dedicate a whole partition to DOSBox.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 7 of 11, by Serious Callers Only

User metadata
Rank Member
Rank
Member

Well, lets be real: only a very very careless person will do this. Also, if it's done, plz plz don't detect windows in a 'simplistic' way, because people actually mount images and drives with windows, including 3.11 from the native filesystem to boot it. Make sure it's actually mounting the native root windows before you do this - platform specific - clippy attendant. In fact, do both this and make it a warning for the windows version only with ifdefn, because people can keep windows 3.11 in another drive to mount boot it, or dosbox can get support for FAT32-native translation layer tomorrow that works on windows (a man can dream).

Reply 8 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I‘m not one of the devs and none of them chimed in, so all please relax 😀
You could make a simple detection in the lines of when using mount (not imgmount) and if it‘s a windows drive (drive letters), root of the drive and a Windows folder on it.
If you want to skip scanning for the Windows folder, then only restrict mounting c:, but warn on other drive roots.
And a switch for the mount command to skip sanity check.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 9 of 11, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

I regularly mount C: in DOSBox as C: (and D: as D: etc) and nothing has yet exploded for that reason. I understand the (minor) risk, and I'll be unhappy if this possibility gets blocked. A warning is enough.

Reply 10 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Most people can drive their car without seatbelt and nothing happens, but I think it was great to make it against the law.
Again, no developer of DOSBox is part of this discussion, it's just a brainstorming after the original post.
As I wrote in the post above yours, my idea would involve a way to skip that check.
Again, just a brainstorming, nothing to get your hopes or fears up...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 11 of 11, by dr_st

User metadata
Rank l33t
Rank
l33t

It's one of these situations where I really agree with both sides.

There is no logical reason to mount the root of the system drive in DOSBox; but I think that it should not be blocked. 😀

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys