Close
Showing results 1 to 4 of 4

Thread: Symlink help?

Hybrid View

  1. #1

    Default Symlink help?

    OK, been reading and searching for several hours, but I'm still not getting it. How do I symlink in Win7?

    I have a few random hard drives installed (but no SSDs) and wanted to play around with different settings to see which would give me the best performance. (i.e. symlinked to 1 location, 1 folder per hard drive, just open the same .exe multiple times, where to put the pagefile, etc.) Not all my slave accounts are on the same version of WoW. I'm slowly upgrading, but for now I have 1 WOLK, 2 BC and 2 Vanilla WoW accounts - I'm not totally sure how that impacts things.

    I fully understand the concept of symlinking, or at least I think I do. I think this post best captures what I want to do. But I can't get to step 1 - download and install the program. Which program? Isn't symlink natively supported in Vista/Win7? I searched and searched and couldn't find any downloadable programs called symlink. I'm reading threads like http://en.wikipedia.org/wiki/NTFS_symbolic_link, http://www.howtogeek.com/howto/windo...windows-vista/, and http://windows7forums.com/windows-7-...-symlinks.html but I'm still missing something. I'm an old command line guy going back to DOS 3.3, but I'm lost. Looks like this is all simple command line instructions (I recocnize that the command line isn't simple for everyone).

    *edit*
    Yeah, I replying to my own post - but hopefully it will help me keep this seperate. I'm playing with a few things...

    **edit**
    Ooooohhhh... This is the "Symlink program" that I think everyone is referring to. http://schinagl.priv.at/nt/hardlinks...kshellext.html - Link Shell Extension (LSE). Looks like it basiclly just gives you the mklink command build in to windows explorer. It wasn't until I understood what was going on behind the scenes that it made sense to me what LSE was doing. Probably not a bad tool and very useful for selectivly "linking" large amounts of stuff at one time. Still if the commands are already build into the OS - I may just stick to those.
    Last edited by jak3676 : 08-11-2009 at 02:03 AM

  2. #2

    Default from howtogeek.com

    So here's what I have from "howtogeek.com"

    The command that you need to use is mklink, which you’ll use from the command line. Just type it on the command line to see the options:
    C:\Users\geek>mklinkCreates a symbolic link.MKLINK [[/D] | [/H] | [/J]] Link Target /D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a symbolic link. /J Creates a Directory Junction. Link specifies the new symbolic link name. Target specifies the path (relative or absolute) that the new link refers to.
    For instance, if you wanted to make the folder C:\Users\Geek\TestFolder available from C:\TestFolder as well, you could use the following command.
    C:\mklink /D C:\TestFolder C:\Users\Geek\TestFolder
    symbolic link created for C:\TestFolder <<===>> C:\Users\Geek\TestFolder
    Now if you look in C:\TestFolder directory, you’ll see whatever files were in the other directory.

  3. #3

    Default

    I'm just not following the powershell idea and I'm turned off by the thought of using a 3rd party program if everything I want to do is already part of the OS. So I'll try to do it from the command line. If I figure it out, maybe I can write a little .bat file to automate it after patches.


    1. Open the command line as administrator (Lots of different ways to do this - I created a new shortcut on my desktop.)

    1a. Right-Click any empty spot on your desktop and select: "New" -> "Shortcut"
    1b. Type in "C:\Windows\System32\cmd.exe" then hit <enter> (or browse to the the file yourself)
    1c. Hit the "Finish" button
    1d. Right-Click the new shortcut icon on your desktop and select "Properties"
    1e. On the "shortcut" tab hit the "Advanced" button in the lower right corner
    1f. Check the block for "run as administrator" and hit "OK"
    1g. back on the "properties" tab hit "OK" again to close it
    1h. Double-Click your new shortcut and enter your administrator password when prompted

    2. Next I'll start by symlinking the entire World of Warcraft directory to my new folders. This command will create the folders at the same time

    2a. You should be at a cursor that looks like this C:\> or C:\Windows\system32\> (it doesn't really matter which)
    2b. Type in the following line where "C:\WoWa" will be the folder where a new "copy" will be placed (the destination) and "C:\World of Warcraft" is where you already have WoW installed the first time (the source).
    mklink /J C:\WoWa "C:\World of Warcraft"
    2c. Repead this step, but replace WoWa with WoWb (hit the arror up on your keypad, then left arrow over to the "a" and replace it with a "b". Continue in this fashion for as many "copies" as you want.

    So at this point I now have C:\WoWa, b, c, d, and e (In addition to my original files). If you bowse to them in windows explorer each folder has the shortcut icon. You'll notice that if you alter something in \WoWa, it changes in all the other copies. I did this with both the /D and the /J swithces and both appeared to do the exact same thing. Perhaps I'm still not totally understanding the difference between a "soft link" and a "hard link". Here's what a few others have to say about it.

    * shortcut: on the operating system level (to applications who wish to read/write the link, it’s just a meaningless file)

    * soft link (or symbolic link): like a shortcut, but on the filesystem level (applications reading/writing the link, will actually read/write the file linked to)
    -> unfortunately this only works with folders on Windows, not with files (which is the reason I’m searching around for information at the moment, I need file symlinks, like in *nix.)
    -> this will work across partitions, or drives

    * hard link: only for files, what happens is that there are multiple file entries that point to the same physical data, when you delete one entry, the other will still work, the data won’t be gone until all entries are deleted (if with a soft link you delete the original directory, the link won’t work anymore!)
    -> you can obviously only create hard links to a file on the same partition

    or

    Hard Link
    A hard link directly points to the file, and acts to the operating system as if it is the file itself. You’ll want to use this option the majority of the time if you are trying to fake an application’s directory.
    Soft Link
    A soft link is essentially a shortcut to a file or folder – if you are using Windows explorer, you’ll be redirected to the directory if you double-click on a shortcut, it won’t pretend its part of the filesystem. You can still directly reference or open a file with the symlinked path, and it mostly works.

    Anyone care to help me out on the difference here? How does that impact what we are trying to do for in-game performance?

    As for performance in game I would expect that my setup to this point would perform exaclty as though I just told keyclone to open 5x copies of the same folder. (I'll try to test tomorrow, just to make sure.) Which isn't bad, but the wole point in doing symlinks is to have some folders that not just links, but actual files - specifically the /interface directory. I don't know of anyway to unlink a specific sub-directory within the larger symlinked folder (don't think its possible actually). So I think the correct step will be to make the folders manually and then symlink everything from my original into the copies except for the few files that I want a hard copy of. Is there anything besides the /interface directory where we want actual files? Why?
    Last edited by jak3676 : 08-11-2009 at 02:11 AM

  4. #4

    Default

    Quote Originally Posted by jak3676 View Post
    OK, been reading and searching for several hours, but I'm still not getting it. How do I symlink in Win7?
    Code:
    mklink /d Data "D:\World of Warcraft\Data"
    mklink /d Cache "D:\World of Warcraft\Cache"
    
    md Errors
    
    md Logs
    md WTF
    
    mklink "BackgroundDownloader.exe" "D:\World of Warcraft\BackgroundDownloader.exe"
    mklink "dbghelp.dll" "D:\World of Warcraft\dbghelp.dll"
    mklink "DivxDecoder.dll" "D:\World of Warcraft\DivxDecoder.dll"
    mklink "ijl15.dll" "D:\World of Warcraft\ijl15.dll"
    
    copy "D:\World of Warcraft\Launcher.exe" Launcher.exe
    
    mklink "Patch.html" "D:\World of Warcraft\Patch.html"
    mklink "Patch.txt" "D:\World of Warcraft\Patch.txt"
    mklink "Repair.exe" "D:\World of Warcraft\Repair.exe"
    mklink "Scan.dll" "D:\World of Warcraft\Scan.dll"
    mklink "unicows.dll" "D:\World of Warcraft\unicows.dll"
    mklink "Wow.exe" "D:\World of Warcraft\Wow.exe"
    mklink "WowError.exe" "D:\World of Warcraft\WowError.exe"
    just create a .bat file and insert that, changing D:\World of Warcraft\ to whatever your main wow install is, then copy the .bat to each of your slave installs and run it. that's how i did it on windows 7 rc

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •