I'll add one more possible fix for anyone who can't get this to work. When I clicked on the script, I was able to navigate to my KOTOR 1 directory and select it, hit cancel when it asks for a KOTOR 2 directory, but then no folder appeared. My Desktop was set to backup to OneDrive. Turned that off and on my next try the script worked perfectly. Open OneDrive from the system tray, click Help & Settings, click Settings, go to the Backup tab, and under Important PC Folders, click Manage backup. From there you can turn off your Desktop folder sync (and a couple others, if desired). Run the script again and you should be good.
You sir, i tip my hat to, Every other fix never worked, but this, this is golden, worked perfectly after this, many thanks random poster from 2 years ago
Just a warning to anyone who uses the BleachBit app on their PC; don't use it to empty the Recycle Bin after you've deleted the symbolic link folders generated by this mod, for it WILL *also* erase the entirety of the games' install folders along with them. Instead, just empty the Recycle Bin the vanilla way. I spent most of a day installing and modding KotOR, and now it's all wasted effort thanks to this bug.
To those for whom the script does not generate the links: here's a simple fix.
Edit the script (right click it, then click "edit" in the context menu. It'll open in notepad. It probably has Word Wrap turned on, you'll want it off (see Format tab).
Copy & Paste this code snippit somewhere after the Set KotOR1Folder... line. Make sure to match the indentation spacing with the other text you paste this after.
Dim DEBUG_OUT_SW1 DEBUG_OUT_SW1 = MsgBox("cmd.exe /c mklink /j %userprofile%\Desktop\KotOR1 """ & KotOR1Folder.Self.Path & """",0,"Ctrl+C, paste to notepad. Run command in admin cmd prompt.")
This'll output the command that the script tries (but fails) to run to a message box. You cannot right-click copy a message box, but press ctrl+c, then paste into a notepad. It'll copy the whole thing. Copy everything in between the hyphenated dashed lines that looks like the following text:
Paste this into an admin command prompt (probably doesn't need admin, but I just did it anyway). Run it, and you're golden.
Do the same for KOTOR 2: after the Set KotOR2Folder line, copy/paste the following code snippit:
Dim DEBUG_OUT_SW2 DEBUG_OUT_SW2 = MsgBox("cmd.exe /c mklink /j %userprofile%\Desktop\KotOR2 """ & KotOR2Folder.Self.Path & """",0,"Ctrl+C, paste to notepad. Copy command to admin cmd prompt.")
That's it. Hope this helps!
Ps: if you are lazy, but can manually confirm for yourself that the executables are present in the correct folders (swkotor.exe, and swkotor2.exe), then you just need the command above, so long as you correctly type the relevant path in the second part. Copy/paste into a command prompt, and just run it.
Also, kudos to @xypherh for the original script. Handy linker :)
33 comments
Open OneDrive from the system tray, click Help & Settings, click Settings, go to the Backup tab, and under Important PC Folders, click Manage backup. From there you can turn off your Desktop folder sync (and a couple others, if desired). Run the script again and you should be good.
mklink /D "C:\Users\username\Desktop" "C:\Program Files (x86)\Steam\steamapps\common\swkotor"
where you replace username with your own username, and the second set of quotation marks contains the install directory you're pointing towards.
mklink /D "C:\Users\username\Desktop\swkotor" "C:\Program Files (x86)\Steam\steamapps\common\swkotor"
The first quoted string is the location of your desktop folder. In my case (Windows 10 Home) the command actually was as follows:
mklink /D "C:\Users\username\OneDrive\Desktop\swkotor" "C:\Program Files (x86)\Steam\steamapps\common\swkotor"
For Kotor 1: mklink /D "C:\Users\%username%\Desktop\Kotor1_Link" "C:\Program Files (x86)\Steam\steamapps\common\swkotor"
For Kotor 2: mklink /D "C:\Users\%username%\Desktop\Kotor2_Link" "C:\Program Files (x86)\Steam\steamapps\common\Knights of the Old Republic II"
Your desktop might be in your OneDrive folder on C:
Look for it here:
"C:\Users\%%username%%\OneDrive\Desktop"
Follow command prompt instructions earlier in this thread but use the above as your first string
Hope this helps!
Symlinks are a feature of the file system (NTFS) not the operating system(Windows).
Power user tip: The Link shell extension allows the creation of symlinks (and other fancy things) from within explorer.
Unable to download this for some reason.Edit: Disregard this, antivirus blocked the download without notifying.
Edit the script (right click it, then click "edit" in the context menu. It'll open in notepad. It probably has Word Wrap turned on, you'll want it off (see Format tab).
Copy & Paste this code snippit somewhere after the Set KotOR1Folder... line. Make sure to match the indentation spacing with the other text you paste this after.
Dim DEBUG_OUT_SW1
DEBUG_OUT_SW1 = MsgBox("cmd.exe /c mklink /j %userprofile%\Desktop\KotOR1 """ & KotOR1Folder.Self.Path & """",0,"Ctrl+C, paste to notepad. Run command in admin cmd prompt.")
This'll output the command that the script tries (but fails) to run to a message box. You cannot right-click copy a message box, but press ctrl+c, then paste into a notepad. It'll copy the whole thing. Copy everything in between the hyphenated dashed lines that looks like the following text:
cmd.exe /c mklink /j "%userprofile%\Desktop\KotOR1" "C:\Program Files\SteamLibrary\steamapps\common\swkotor"
Paste this into an admin command prompt (probably doesn't need admin, but I just did it anyway). Run it, and you're golden.
Do the same for KOTOR 2: after the Set KotOR2Folder line, copy/paste the following code snippit:
Dim DEBUG_OUT_SW2
DEBUG_OUT_SW2 = MsgBox("cmd.exe /c mklink /j %userprofile%\Desktop\KotOR2 """ & KotOR2Folder.Self.Path & """",0,"Ctrl+C, paste to notepad. Copy command to admin cmd prompt.")
That's it. Hope this helps!
Ps: if you are lazy, but can manually confirm for yourself that the executables are present in the correct folders (swkotor.exe, and swkotor2.exe), then you just need the command above, so long as you correctly type the relevant path in the second part. Copy/paste into a command prompt, and just run it.
Also, kudos to @xypherh for the original script. Handy linker :)