Is Windows equivalent to Linux namespaces (for mounting a file system for each process)?

Linux has a namespaces function that allows you to distinguish between the "representation" of a file system and various processes. In terms of Windows, this would be useful, for example, if you had an outdated "floyd" program that always loaded its configuration from C:\floyd\floyd.ini. If there was a namespace on Windows, you could write a shell script that created a namespace to be executed floyd, which does so when Alice runs the script, floyd runs in the environment where it C:\floydexists, but actually points to C:\Users\Alice\Floyd.

Now you might be thinking, "OK, just use soft or hard links and make an C:\floydalias for C:\Users\Alice." But with the namespace, Bob can also start the script, but he will see an instance of floyd (on the same computer that works at the same time) C:\floydwith the contents, say C:\Users\Bob\Program Settings\Floyd Config(or any other way we like).

You can do this on Linux with namespaces. Is there something similar or similar in Windows? This is normal if you need to write a C program for this, and it is normal if it only works on the latest versions of Windows.

+5
source share
9 answers

NTFS - . . , " " ( ). , .

" ", ( ) , .

. - .

+3

, Virtual Store , . , , , C:\floyd.

+1

, , , % temp%,% appdata%,% localappdata%. , , .

, "% myspecialplace%\myfile.txt" .

0

Windows Vista . , c:\Program Files\Floyd c:\Users\<username>\AppData\Local\VirtualStore\Program Files\Floyd. , Linux. , , , 32- , , . ( , c:\Program Files c:\Users\<username>\AppData\Local\VirtalStore.)

, , , .

0

kludge ( ), NamedPipe C:\Floyd, - , ?

, , NamedPipes (FIFO ) Windows, , .

Dan

0

, .

, ( , CallbackFilter), , , . , , . , , . .

: (Thinstall, Molebox, ), "" , / . SDK, , .

0

. () NTFS - , , . MSalters, NTFS , - , , - , NTFS.

(Junction - , NTFS: http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx)

- ( , ) script, ( , ). .

, Windows , , % localappdata% ( Vista on) , ,% userprofile% .   , .

0
source

All Articles