Is there a windows equivalent to chroot?

Solution 1:


Not exactly like chroot. It does setup a sandbox for each program you specify. It can easily keep processes isolated.

Solution 2:

I'm not sure you will gain anything on Windows by chrooting - do you have a specfic need?

In case any the top result on google is

Perhaps application virtualization might be an option? Microsoft has the following to say about it:

In a physical environment, every application depends on its OS for a range of services, including memory allocation, device drivers, and much more. Incompatibilities between an application and its operating system can be addressed by either server virtualization or presentation virtualization; but for incompatibilities between two applications installed on the same instance of an OS, you need Application Virtualization.

Solution 3:

To solve this specific need (program assumes it's running off of a root directory), the SUBST command is probably what you want. It's a holdover from DOS, and still exists in windows 10.

the SUBST command will mount a directory as a new drive letter.

then you can run the software from the newly created drive, and it will think it's on your new drive S if you run it from that path.

Solution 4:

I wouldn't use anything like this, you are running under Windows mate.

NTFS has the most fine grained access rights you can find. Its not hard to let a prozess start with lower privileged user, and only giving that user access to the files of this single application.

No need to use something like chroot, which is not a security tool, when you can already define what user is allowed to do what in what directory.

Its no different than like giving the Apache under Linux its own user, only allowed to work inside his folders.

Solution 5:

There is a chroot.exe included in Gow (Gnu On Windows)