-
Notifications
You must be signed in to change notification settings - Fork 3
/
CreateSimLink_Classic.bat
31 lines (24 loc) · 1.04 KB
/
CreateSimLink_Classic.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
set "params=%*"
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
set "gamePath=C:\Games\World of Warcraft\"
IF NOT EXIST "%gamePath%" set "gamePath=D:\Games\World of Warcraft\"
IF NOT EXIST "%gamePath%" set "gamePath=C:\Program Files (x86)\World of Warcraft\"
IF NOT EXIST "%gamePath%" set "gamePath=D:\Program Files (x86)\World of Warcraft\"
IF NOT EXIST "%gamePath%" (
echo Game directory not found.
pause
exit
)
:MakeLink
set /p addon=Which addon would you like to link?
set "addonPath=%CD%\%addon%"
IF NOT EXIST "%addonPath%" (
echo The addon doesn't exist.
goto MakeLink
)
set "linkPath=%gamePath%_classic_\Interface\AddOns\%addon%"
IF NOT EXIST "%linkPath%" (
mklink /D "%linkPath%" "%addonPath%"
) ELSE echo A link for this addon already exists.
goto MakeLink