Move a installed Application to a different Drive letter via Symbolic Links

In Office 2013 MS "improved" the installation process to hard code it to only install on the C:\ drive. Many people with small HD's cannot spare the space to do a full install of Office on their C:\ drive. But there is no longer an easy option to do a "custom" install that limited the installation to specific applications or moving it to other drives. 

There are workarounds to this problem. The business focused Office Deployment Toolkit allows users to selectively install applications. The second half of the problem can be resolved using a very old techique. Back at the dawn of computing, drive space was limited so users of DOS needed a way to trick DOS into looking at other drives as if they were part of the C:\ drive. This was done using "Symbolic Links"

The following articles list several ways to create these symbolic links either using native DOS commands, or by using Applications to mask the use of these commands.

Move Installed Apps & Programs in Win10

https://www.makeuseof.com/tag/move-installed-apps-programs-windows-10/

This article contains a few options including a couple of utilities

 

2014 02 13- Redirect Folders to Other Drives in Windows

http://www.tomshardware.com/faq/id-2024314/redirect-folders-drives-windows.html

 

This article describes the built in way to redirect folders to other locations, ie other drives.

 

2013 03 21- Move the Snagit Library to a Second HDD Using Symlinks

https://www.groovypost.com/howto/migrate-snagit-capture-library/

 

<snip>

… by default the Snagit capture library is stored in your local AppData folder and there is no setting to change this. When you’re running a small SSD as your primary drive, you can see how this might be a problem. To work around Techsmith’s feature indiscretion, you can move the library to a second drive, and then use symbolic links to trick Snagit into thinking it’s still there in the original location

</snip>

 

Junction Versus MKLink

Please note that Junction is not supported over network shares. For that you can use the ‘mklink’ command, but only if it is available / supported in your version of Windows. Click here for an example using a network share with mklink via the command prompt; it works very similar to Junction but the command line switches (parameters) are not the same. Click here to read differences between mklink and junction. You can download Junction here.

 

365 Alternate Install Location - Symbolic Links

I have received independent confirmation that using symbolic links will successfully redirect Office 365 installations to an alternate location.

 

2017 10 06- How to take advantage of symbolic links in Windows 10 https://www.techrepublic.com/article/how-to-take-advantage-of-symbolic-links-in-window-10/

 

How to: Move Installed Programs to Another Drive in Windows 7, 8, 10 https://www.infopackets.com/news/9789/how-move-installed-programs-another-drive-windows-7-8-10 (see below) Use a Program called “Junction” made by SysInternals to create the Symbolic Links for you. Also read the comment for a different idea.

 

Create Symbolic Links, Hard Links and Directory Junctions in Vista with MKLINK - http://www.mydigitallife.info/create-symbolic-links-hard-links-and-directory-junctions-in-vista-with-mklink/ (see below)

 

Complete Guide to Symbolic Links (symlinks) on Windows or Linux http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/ (see below)

 

Be more efficient and better organized with the MKLink symbolic link tool - http://www.techrepublic.com/blog/windows-and-office/be-more-efficient-and-better-organized-with-the-mklink-symbolic-link-tool/(see below)

 

http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

 

*********Description of how using Symbolic Link has been done **********

https://answers.microsoft.com/en-us/office/forum/office_2016-office_install/office-16-drive-location/0c62927c-721a-4629-b283-5809c8e16f2c

<snip>

Palcouk replied on Oct 26, 2015:

Office click to run products install to the win drive, you cannot do a custom install, its an all or nothing install

There is a method, if you are prepared to delve in. Modify the following steps according to your specific situation:

I too was wanting to move my Office 365 install to a different drive. My main goal was to put it on a RamDisk to make it very quick to load.

 

I had created a RamDisk of 5GB, using http://www.radeonramdisk.com/software_downloads.php . The new drive was mounted as drive O:

·    Install Office 365 as normal, on the C drive.

·    Make a note of the two main Office directories:

C:\Program Files\Microsoft Office 15

C:\Program Files (x86)\Microsoft Office

·    Empty the Recycle bin before continuing.

·    Run Task Manager

·    Stop anything Microsoft Office related.

·    Delete both of the above directories

·    Open a CMD prompt, and run these commands:

 

MKLINK /J “C:\Program Files\Microsoft Office 15” “O:\Program Files\Microsoft Office 15”?

MKLINK /J “C:\Program Files (x86)\Microsoft Office” “O:\Program Files (x86)\Microsoft Office”

·    This created junction points for each directory on the C drive that Office installs to, and point them to the O drive. So the OS thinks its going to C drive for those folders, but in reality its going to the O drive.

·    Go to the recycle bin and restore all the deleted files. The files then appeared on the O drive.

·    Save the RamDisk to an image file (so it gets loaded when windows starts)

·    Reboot

 

After reboot, when I open an office app, its so fast you can’t time it!

You don’t have to do the ramdisk portion, its the junction’s that make it work.

I have 32GB of ram, and am only using about 5gb on average, so having a ramdisk makes sense for me.

 

RamDisks are about 8 to 10 times faster than SSD but are volatile memory, so it needs to be saved to disk if you don’t want to lose it.

</snip>

 

Create Symbolic Links, Hard Links and Directory Junction Points in Windows with MKLINK

https://techjourney.net/create-symbolic-links-hard-links-and-directory-junction-points-in-windows-with-mklink/

 

Home»Operating Systems»Windows»Create Symbolic Links, Hard Links and Directory Junction Points in Windows with MKLINK

 

For Unix-like or Linux system users, symbolic link is a common feature in use almost daily. Symbolic link (aka soft link) or symlink as it often shortened to, is a special type of file or file-system object that serves as a reference or points to another file, UNC or directory, known as target. In Windows systems such Windows Vista and Windows Server 2008, e.g. Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2 and Windows Server 2016, symlinks feature has been added to NTFS filesystem and can be created by using MKLINK command.

In previous Windows operating system such as Windows XP, the closer thing to symbolic links is NTFS junction point, or worse, Windows shell shortcut (.lnk) file.

Symlink in Windows, unlike .lnk shortcut in desktop or Windows Explorer, allow user to access files within the symbolic link created itself via File Explorer, the console and etc. And symbolic link also differ from NTFS junction point which can only link to folders and volumes, in which symlinks can point to a file, a UNC, a folder or a volume, as well as able to span file systems.

Symbolic link is useful when you have a lot of folders and files are scattered all over the directory tree, and you need to manage them from a single location. Another scenario is that you have a deep nested file that you want to access quickly instead of traverse through one branch by one branch. And furthermore, for programmer, symlink provides a static file path that can be point to a ever changing object without affecting the functionality of the program. In all these situation, symbolic links can be created at a convenient location which point to the ‘real’ objects.

As mentioned, to create a symbolic link, use MKLINK command line tool. MKLINK can be used to create a hard link or directory junction (junction point) too. Hard link is essentially giving another name or label to the objects, while NTFS directory junction point is used to redirect the whole folder to another folder as if it’s the original folder itself. Junction point is used extensively in Windows to provide support for old directory structures for user profiles (i.e Documents and Settings) to point to the new user folders located inside Users directory.

Syntax and Options of MKLINK

MKLINK [[/D] | [/H] | [/J]] Link Target

/D – Creates a directory symbolic link. Default to 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.

Examples and Usages of MKLINK

Note: Only Administrators can use MKLINK to create symbolic links unless override by using secpol.msc, so you need to run Command Prompt with elevated privileges, or else you will get “You do not have sufficient privilege to perform this operation.” error.

To create symbolic link called foo to reference to c:\Windows\System32\notepad.exe:

C:\test>mklink foo c:\Windows\System32\notepad.exe

You will see the following result:

symbolic link created for foo <<===>> c:\Windows\System32\notepad.exe

If you type dir in commnd prompt, you will see the following listing:

Volume in drive C has no label.
Volume Serial Number is 2211-7428
 
Directory of C:\test
04/14/2006  11:24 AM    <DIR>          .
04/14/2006  11:24 AM    <DIR>          ..
04/14/2006  11:24 AM    <SYMLINK>      foo [c:\Windows\system32\notepad.exe]
               1 File(s)              0 bytes
2 Dir(s)  69,238,722,560 bytes free

To create symbolic link to a folder, simply use /D switch, or /J for junction point (directory junction is not available for remote network location):

C:\test>mklink /d bar c:\Windows
symbolic link created for bar <<===>> c:\Windows

Results of dir command:

Volume in drive C has no label.
Volume Serial Number is 2211-7428
 
Directory of C:\test
04/14/2006  11:24 AM    <DIR>          .
04/14/2006  11:24 AM    <DIR>          ..
04/14/2006  11:24 AM    <SYMLINKD>     bar [c:\Windows]
04/14/2006  11:24 AM    <SYMLINK>      foo [c:\Windows\system32\notepad.exe]
               1 File(s)              0 bytes
3 Dir(s)  69,238,722,560 bytes free

MKLINK cannot be used to delete symbolic link. To remove a symbolic link, simply delete them as if you’re removing a normal file. For example, to delete the foo symbolic link created above, enter the following command:

C:\test>del foo

To remove the bar symbolic link to a folder created above, use the following command:

C:\test>rd bar

 

https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

 

by Chris Hoffman

 

Windows 10, 8, 7, and Vista all support symbolic links—also known as symlinks—that point to a file or folder on your system. You can create them using the Command Prompt or a third-party tool called Link Shell Extension.

 

What Are Symbolic Links?

Symbolic links are basically advanced shortcuts. Create a symbolic link to an individual file or folder, and that link will appear to be the same as the file or folder to Windows—even though it’s just a link pointing at the file or folder.

For example, let’s say you have a program that needs its files at C:\Program. You’d really like to store this directory at D:\Stuff, but the program requires that its files be at C:\Program. You could move the original directory from C:\Program to D:\Stuff, and then create a symbolic link at C:\Program pointing to D:\Stuff. When you relaunch the program, it will try to access its directory at C:\Program. Windows will automatically redirect it to D:\Stuff, and everything will just work as if it were in C:\Program.

This trick can be used for all sorts of things, including syncing any folder with programs like Dropbox, Google Drive, and OneDrive.

There are two type of symbolic links: Hard and soft. Soft symbolic links work similarly to a standard shortcut. When you open a soft link to a folder, you will be redirected to the folder where the files are stored.  However, a hard link makes it appear as though the file or folder actually exists at the location of the symbolic link, and your applications won’t know any better. That makes hard symbolic links more useful in most situations.

Note that Windows doesn’t actually use the terms “hard link” and “soft link”. Instead, it uses the terms “hard link” and “symbolic link”. In the Windows documentation, a “symbolic link” is the same thing as a “soft link”. However, the mklink command can create both hard links (known as “hard links” in Windows) and soft links (known as “symbolic links” in Windows).

How to Create Symbolic Links with mklink

You can create symbolic links using the mklink command in a Command Prompt window as Administrator. To open one, locate the “Command Prompt” shortcut in your Start menu, right-click it, and select “Run as Administrator”.

On Windows 10’s Creators Update, you can use a normal Command Prompt window, without running it as an Administrator. However, to do this without an Administrator Command Prompt window, you must first enable Developer Mode from Settings > Update & Security > For Developers.

Without any extra options, mklink creates a symbolic link to a file. The below command creates a symbolic, or “soft”, link at Link pointing to the file Target :

mklink Link Target

Use /D when you want to create a soft link pointing to a directory. like so:

mklink /D Link Target

Use /H when you want to create a hard link pointing to a file:

mklink /H Link Target

Use /J to create a hard link pointing to a directory, also known as a directory junction:

mklink /J Link Target

So, for example, if you wanted to create a hard link at C:\LinkToFolder that pointed to C:\Users\Name\OriginalFolder, you’d run the following command:

mklink /J C:\LinkToFolder C:\Users\Name\OriginalFolder

You’ll need to put quotation marks around paths with spaces. For example, if the folders are instead named C:\Link To Folder and C:\Users\Name\Original Folder, you’d use the following command instead:

mklink /J “C:\Link To Folder” “C:\Users\Name\Original Folder”

If you see the message “You do not have sufficient privilege to perform this operation.”, you need to launch the Command Prompt as Administrator before running the command.

How to Create Symbolic Links with a Graphical Tool

If you’re like to do this with a graphical tool, download Link Shell Extension. Be sure to download the appropriate prerequisite package before the tool itself—both are linked to on the tool’s download page.

Once it’s installed, locate the file or folder you want to create a link to, right-click it, and select “Pick Link Source” in the menu.

You can then right-click inside a different folder, point to the “Drop As” menu and select “Hardlink” to create a hard link to a file, “Junction” to create a hard link to a directory, or “Symbolic Link” to create a soft link to a file or directory.

How to Delete Symbolic Links

To get rid of a symbolic link, you can simply delete it like you would any other file or directory. Just be careful to delete the link itself rather than the file or directory it’s linking to.

 

2010 09 01- Be more efficient and better organized with the MKLink symbolic link tool

http://www.techrepublic.com/blog/windows-and-office/be-more-efficient-and-better-organized-with-the-mklink-symbolic-link-tool/

 

Greg Shultz explains in detail what a symbolic link is and shows you how to use the MKLink in Windows 7 to simply file management.

By Greg Shultz

 

If you are like most folks who have been using Microsoft Windows for quite some time, chances are good that you create and use shortcuts quite regularly. As you know, shortcuts can save you time and effort when it comes to quickly accessing applications or folders. While creating and using these types of standard shortcuts is quite simple, Windows 7 and Vista come with a tool called MKLink for creating a more advanced type of shortcut called a symbolic link.

In this edition of the Windows Desktop Report, I’ll explain in more detail what a symbolic link is and show you how to use the MKLink tool. I’ll then show how I use symbolic links to simplify file management.

This blog post is also available in PDF format in a TechRepublic download.

 

What is a symbolic link?

As I alluded to in the introduction, a symbolic link is essentially a more advanced type of shortcut. More specifically, a symbolic link is a file-system object that points to another file system object. The file system object can be either a file or a folder. Symbolic links are transparent to users because the links appear as normal files or folder and can be accessed by applications as well as users in exactly the same manner. Keep this thought in mind as we explore MKLink tool.

The MKLink tool

In order to use the MKLink tool, you have to open a command prompt in administrator mode.

Click the Start button.

Type CMD in the Start Search box.

Press and hold down [Ctrl]+[Shift]+[Enter].

When you do, you will encounter a UAC dialog box and will have to respond accordingly.

When the Administrative command prompt window appears, just type mklink and you will see the tools syntax description, as shown in Figure A.

 

Figure A

Using the MKLink tool on the command line is easy.

As you can see, the default command (without any options) will create a symbolic link to a file. For example, the command:

mklink pad.exe notepad.exe

will create a file symbolic link where typing pad.exe will allow you to launch notepad.exe.

Using the /D option will create a symbolic link to a folder. For example, the command:

mklink /D c:\one c:\two\three\four

creates a symbolic link called one, which points to the folder called four.

The /H option will create a hard link rather than a symbolic link. The difference between a hard link and a symbolic link is that instead of working like a shortcut, a hard link is more like renaming the file. For example, the command:

mklink /H pad.exe notepad.exe

makes the operating system treat pad.exe as if it were actually notepad.exe.

Finally, the /J option will create a hard link to a folder. This is also called a Directory Junction (a.k.a. junction point) and instead of working like a shortcut to a folder, a hard link works more like a regular folder. For example, the command:

mklink /J c:\one c:\two\three\four

makes the operating system work with the long directory structure c:\two\three\four just as if it were a single directory named c:\one.

When you’re finished with any one of these types of symbolic links, you can terminate the link simply by deleting the link. For example, to terminate the one hard link, you’d simply delete the c:\one folder. However, since the link is terminated first and c:\one folder is actually empty, you needn’t be concerned about data loss in the c:\two\three\four folder.

The CurrentWork example

Back in the Windows 2000 days, I developed my CurrentWork file-management technique to reduce the amount of time and effort I spent navigating my very detailed-oriented folder organizational structure. To do so, I used a command-line tool called Linkd.exe from the Windows 2000 Resource Kit. (The old Linkd tool worked similarly to the current MKLink tool.) Now that I’m using Windows 7, I’m using the MKLink tool.

To use this technique, I use the MKLink tool to create a symbolic link that creates the C:\CurrentWork folder and redirects it to a folder deeply nested in the folder structure that I use to keep my work organized. For example, the target folder could have the path:

C:\Users\Greg Shultz\My Documents\Articles\TechRepublic\2010\9) September 10 \9-3

As I finish an assignment, I remove that symbolic link and create a new one for the next assignment. Of course, this means that the target folder is always changing as I move from assignment to assignment. However, once I create the new symbolic link, the only folder name I have to navigate to when opening, saving, or copying files related to the assignment is the C:\ CurrentWork folder. This has saved me an immeasurable amount of time and frustration.

For example, before writing this article, I used the command

Mklink /J C:\CurrentWork “C:\Users\Greg Shultz\My Documents\Articles\TechRepublic\2010\9) September 10\9-3”

As you can see, since I’m working on the command line and the target path contains long names with spaces, I have to enclose the target path in double quotes. However, even though the path is very long, while I was working on this article, the only folder I had to remember was CurrentWork.

 

How to Move Installed Programs to Another Drive in Windows 7, 8, 10

 

Using Junction means that you will need to run it from an administrative command prompt. To do so, click Start and then type in “cmd” (no quotes), then wait for Command Prompt or CMD.EXE to appear in the list, then right click it and choose Run as Administrator.

 

As a working example: in the past I had to move the ‘..\appdata\Apple Computer’ folder for a user because it was taking up too much space on the C drive. I made an ‘AppData’ folder on the D drive using the command below; note that the ‘-s’ switch means to include all directories inside of the parent folder (otherwise known as directory recursion). The command was:

 

junction.exe -s “C:\Users\%USERNAME%\AppData\Roaming\Apple Computer” “D:\AppData\Roaming\Apple Computer”

 

Note that I used quotes around the directory names - that is required if you have any spaces in folders or files. It’s a safe bet to use quotes around the source and destination folders, regardless. I suggest using the “-s” (recurse directories) for all your symbolic links, otherwise your programs may not work properly. If you wanted to remove the junction, then the command would be:

 

junction.exe -d “D:\AppData\Roaming\Apple Computer”

 

Symbolic Links to redirect CTR installation?

You can use “Symbolic” links to tell the Office 365 installer to put the program files in a different location on the HD, or a different drive

http://www.techrepublic.com/blog/windows-and-office/be-more-efficient-and-better-organized-with-the-mklink-symbolic-link-tool/ -Be more efficient and better organized with the MKLink symbolic link tool

http://www.howtogeek.com/194431/how-to-sync-any-folder-to-the-cloud-with-symbolic-links/  -How to Sync Any Folder to the Cloud With Symbolic Links

http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/  -Complete Guide to Symbolic Links (symlinks) on Windows or Linux

http://www.mydigitallife.info/create-symbolic-links-hard-links-and-directory-junctions-in-vista-with-mklink/ -Create Symbolic Links, Hard Links and Directory Junctions in Vista with MKLINK

https://support.microsoft.com/en-us/kb/3073930 - Link Shell extension (a tool to allow you to make the Links from Windows rather than from the Command Line)

 

How to: Move Installed Programs to Another Drive in Windows 7, 8, 10 - Junction

https://www.infopackets.com/news/9789/how-move-installed-programs-another-drive-windows-7-8-10

<snip>

by Dennis Faas on February, 22 2016 at 08:02AM EST

Infopackets Reader ‘Ed’ writes:

“ Dear Dennis,

Back in the days of Windows 95 and 98 there used to be a utility called Change of address (also known as ‘COA’ or ‘COA2’), which allowed you to move a program from one drive to another. For example, I could move an installed program from C: to D: drive, then Windows would run the program from the new location. Is there still such a utility available for Windows 7, 8 and 10? “

My response:

Change of Address was created by Ziff Davis and is downloadable through PC Magazine’s website. That said, the program was made in 2001 and I am not sure if you can still use it on newer operating systems such as Windows 7, 8 and 10.

There is however another program that is widely used today that works similar to Change of Address. It’s called “Junction” and it’s made by SysInternals - the same people that brought us Process Explorer, which is like Task Manager on steroids. There’s also ‘mklink’ by Microsoft, but some versions of Windows do not have it.

</snip>

 

How Symbolic Links, or “Symlinks” Work

Junction works by using a symbolic link or “symlink” - this is basically a placeholder with a redirection to another location. When you create a symbolic link to a file or folder, the file / folder will still appear as it normally does, but the system will automatically point to another location you previously specified. For example: you could create a symlink for C:\Documents relocate it to D:\Documents. Clicking on C:\Documents would actually take you to D:\Documents, and any program that referenced the old location would automatically and seamlessly link to the new location.

 

If you intend to move the entire C:\Program Files folder (for example), you should reboot into Windows Safe Mode first, as using Junction on an open program will either result in an ‘Access Denied’ error, or possible data corruption. Put another way, you cannot move around files and folders that are currently open; by booting into Safe Mode, you will effectively run Windows in ‘bare bones’ mode, which does not automatically launch programs that typically start when Windows boots into the desktop.

Was this article helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this article?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this article?

Thanks for your feedback.

 

Forum Article Info


Last updated October 5, 2021 Views 11,132 Applies to: