A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

linkd, junction, etc & LSE



 
 
Thread Tools Display Modes
  #1  
Old March 1st 16, 10:50 AM posted to microsoft.public.windowsxp.general
Ammammata
external usenet poster
 
Posts: 209
Default linkd, junction, etc & LSE

According to technet.microsoft.com, and in particulat ro Windows
Sysinternals:

To create a junction c:\Program-Files for "c:\Program Files":
C:\md Program-Files
C:\junction c:\Program-Files "c:\Program Files"
Address : https://technet.microsoft.com/en-us/sysinternals/bb896768


Now, if I follow the "manual", step-by-step:

C:\md Program-files

C:\junction c:\program-files "c:\program files"

Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Error creating crogram-files:
Impossibile creare un file, se il file esiste gia'
(File creation impossible since the file already exists)

So I delete the program-files folder and re-run the command:

C:\junction c:\program-files "c:\program files"

Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Created: c:\program-files
Targetted at: c:\program files

It works, good, but I need to link an external folder, a network one:

C:\junction c:\program-files "\\192.168.1.3\setup"

Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Error setting junction for c:\program-files:
I dati contenuti nel buffer del punto di nuova analisi non sono validi.
(Buffer data contained in the new-analisys point are't valid; sorry for the
tranlsation but the pc I'm working on has Italian windows)

Final step, try with a mapped network drive:

C:\junction c:\program-files "z:\setup"

Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Error setting junction for c:\program-files:
I dati contenuti nel buffer del punto di nuova analisi non sono validi.
(same error as above)


If I use linkd from Windows Server 2003 Resource Kit Tools I get similar
errors:

C:\linkd c:\program-files "z:\setup"
Cannot create a link at: c:\program-files

C:\linkd c:\program-files "\\192.168.1.3\setup"
Cannot create a link at: c:\program-files

C:\linkd c:\program-files "c:\program files"
Link created at: c:\program-files

(the last one is the only one that works)

Unfortunately Link Shell Extension, that can create junctions, hard links
and even symlinks on Windows XP

http://schinagl.priv.at/nt/hardlinks...kshellext.html

doesn't work on this computer (don't know why, yet...)

any help/alternative is appreciated

--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
http://www.bb2002.it

............ [ al lavoro ] ...........
Ads
  #2  
Old March 1st 16, 03:04 PM posted to microsoft.public.windowsxp.general
JJ[_11_]
external usenet poster
 
Posts: 744
Default linkd, junction, etc & LSE

On Tue, 1 Mar 2016 10:50:55 +0000 (UTC), Ammammata wrote:
It works, good, but I need to link an external folder, a network one:

C:\junction c:\program-files "\\192.168.1.3\setup"

Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Error setting junction for c:\program-files:
I dati contenuti nel buffer del punto di nuova analisi non sono validi.
(Buffer data contained in the new-analisys point are't valid; sorry for the
tranlsation but the pc I'm working on has Italian windows)

Final step, try with a mapped network drive:

C:\junction c:\program-files "z:\setup"

Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Error setting junction for c:\program-files:
I dati contenuti nel buffer del punto di nuova analisi non sono validi.
(same error as above)

If I use linkd from Windows Server 2003 Resource Kit Tools I get similar
errors:

C:\linkd c:\program-files "z:\setup"
Cannot create a link at: c:\program-files

C:\linkd c:\program-files "\\192.168.1.3\setup"
Cannot create a link at: c:\program-files

C:\linkd c:\program-files "c:\program files"
Link created at: c:\program-files

(the last one is the only one that works)

Unfortunately Link Shell Extension, that can create junctions, hard links
and even symlinks on Windows XP

http://schinagl.priv.at/nt/hardlinks...kshellext.html

doesn't work on this computer (don't know why, yet...)

any help/alternative is appreciated


Although symbolic links are junctions / reparse points, and junctions /
reparse points are natively supported under Windows XP, symbolic links are
not. And although creation of symbolic links to remote target is possible,
the symbolic links won't work at all. Only local junctions / reparse points
will work.

For symbolic link support under Windows XP, you'll need additional device
driver (symlink) from this site:

https://emk.name/symlink.html

Note: Site is in Japanese, so use Google Translate to translate the page to
English. On that page, there's a link for English language but it doesn't
even mention the symlink driver.
  #3  
Old March 1st 16, 07:47 PM posted to microsoft.public.windowsxp.general
VanguardLH[_2_]
external usenet poster
 
Posts: 10,881
Default linkd, junction, etc & LSE

Ammammata wrote on 2016/03/01:

According to technet.microsoft.com, and in particulat ro Windows
Sysinternals:
To create a junction c:\Program-Files for "c:\Program Files":
C:\md Program-Files
C:\junction c:\Program-Files "c:\Program Files"
Address : https://technet.microsoft.com/en-us/sysinternals/bb896768

Now, if I follow the "manual", step-by-step:
C:\md Program-files
C:\junction c:\program-files "c:\program files"


The junction is a pointer in the file system. There cannot already be a
folder by that name; else, you would be trying to define a pointer and
folder with the same name. You cannot have different objects defined
with the same name under the same parent object: you cannot have files
by the same name under the same folder, you cannot have folders with the
same name under the same parent folder, and you cannot have the same
name for a junction and another folder under the same parent folder.
Each requires a unique absolute name (full path to the object) stored in
the file system.

Reparse points are a feature of NTFS. So you must format using NTFS as
the file system to have reparse points available. You cannot define
reparse point using the FAT[16/32] and exFAT file systems. Probably a
more accurate method of saying "reparse point" is "NTFS reparse point".

The article is wrong. Don't make a folder with the same name as the
junction. When you create junction, you are adding an NTFS object entry
under a parent object so you cannot have child objects with the same
name. A GUI tool I used back in Windows XP was Junction Magic. Made it
easier to visualize what I was doing.

http://rekenwonder.com/linkMagic.htm

That author points at the hard link software that you noted below.

Some info on reparse points at:
https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx

It works, good, but I need to link an external folder, a network one:


Junctions are defined within the file system of the OS instance you have
loaded. They are actually file system entries. Junctions are not
defined in the registry. That means, in Windows XP, that you can have
junctions pointing to folders within the mass storage devices (HDDs,
SSDs) that are internal on drive assignments for partitions on those
internal mass storage devices. You cannot define junctions for
removable mass storage (e.g., USB-attached drives) or networked drives
because those volumes are defined in the registry, not in the local file
system, an access to their folders and files requires using their file
system, not the local one loaded and used by the current instance of
Windows. That's why those external file systems have to be mounted.

https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx
"A hard link is the file system representation of a file by which more
than one path references a single file in the same volume."
" ... junction can link directories [now called folders] located on
different /*local*/ volumes on the same computer."

As of Windows Vista, and later, Microsoft added the 'mklink' command
that can create both [directory] junctions (point to folders) and [file]
symbolic links. Back in Windows XP, you had to use 3rd party tools but
could only define junctions. Although reparse points have always been a
property of NTFS, and although Microsoft has used them, they didn't
expose them until Windows Vista and then only with console-mode commands
rather than integrate the feature into Windows Explorer.

Unfortunately Link Shell Extension, that can create junctions, hard links
and even symlinks on Windows XP

http://schinagl.priv.at/nt/hardlinks...kshellext.html

doesn't work on this computer (don't know why, yet...)


Again, reparse points must be defined within the local file system
(NTFS) in use by the currently loaded instance of the OS, not in its
registry as mount points.

To get outside of the local NTFS file system, you would have to install
software (driver, file stack I/O) that would extend NTFS. I did find:

http://blogs.technet.com/b/doxley/ar...rk-drives.aspx

where you don't need to install software to enhance reparse points in
NTFS. I have tried this but you can. It uses a shortcut (.lnk file) to
uses class 0AFACED1-E828-11D1-9187-B532F1E9575D which points to
shell32.dll as the handler. Although the author says you could create
the shortcut manually, he does not show how to do that but does provide
a VB script to create the target.lnk file. I think you must use that
specific name for the shortcut. According to the articles, that class
ID is for a Target object (which is named Folder Shortcut under my
Windows 7 instance). You put the target.lnk file in the target folder
(i.e., the one you want redirected elsewhere). So the source folder
must exist (unlike with a junction) for you to put the target.lnk file
in it. Another article that talks about the same trick is at:

http://www.techrepublic.com/article/...in-windows-xp/

I suspect the mapping is temporary so you would have to run the shortcut
to get at its registry definition by accessing that folder. That is,
until you run a program that uses shell32.dll to access that folder, the
remap doesn't yet exist. Also, the articles mention that you must use a
program that calls shell32.dll to access the source folder. I really
would not call this a junction as it is not an object define in the NTFS
file system. Instead it is using a registry trick to afford a remap
from the source to somewhere else. For example, the "Take Ownership"
trick of adding a command to a shell object defined in the registry is
not adding a feature to Windows Explorer but using a registry trick. It
adds an context menu entry (shell object) that when called will execute
a command containing a series of subcommands, which a

cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F

You pick a folder object in Windows Explorer, right-click to show the
added shell object "Take Ownership" and when you select it the above
command string gets executed on that folder object. Yep, you can have
registry entries execute command(s). In the above trick of adding a
target.lnk shortcut file, it uses the trick of using the shell32.dll
handler when a folder is opened that contains that specific object
(target.lnk).

If you do use junction points (or even the registry trick of activating
a handler upon access of a folder object), be aware that not all
programs will ignore them when appropriate. For example, backup
programs SHOULD ignore junctions; else, they can end up duplicating the
content in their backup file. There would be one backup copy of the
folder's files and subfolders because the backup program found the
actual folder. There would be another backup copy of the folder's files
and subfolders when the backup program found the junction point. In
fact, if you aren't careful with junctions, you can end up with circular
definitions that would result in repeatedly backing up the same content
over and over and your backup file would increase in size until there
was no more free space in the destination path for the backup file. You
need to use backup software that is junction aware. Anything not
junction-aware, like the 'dir' command, will report wrong free space. I
am not aware that any backup or other program will understand the
registry trick of using a target.lnk object to activate a call to
shell32.dll in the registry; however, backup programs may simply backup
only the source folder and not follow target.lnk to the destination
folder. I've never used the registry trick to *emulate* a junction
(that registry trick is not a reparse point in the NTFS file system - so
that trick should be called a shell32 redirection, not a junction).
  #4  
Old March 2nd 16, 07:52 AM posted to microsoft.public.windowsxp.general
Ammammata
external usenet poster
 
Posts: 209
Default linkd, junction, etc & LSE

Il giorno Tue 01 Mar 2016 11:50:55a, *Ammammata* inviava su
microsoft.public.windowsxp.general il messaggio
. 189. Vediamo cosa
scrisse:


any help/alternative is appreciated



THANK YOU to both JJ & VanguardLH
I saved the posts in my computer KB folder and will try next time I
visit the customer

--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
http://www.bb2002.it

............ [ al lavoro ] ...........
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 10:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.