Small .bat script to install qml mods
lord-carlos
Member Posts: 3,483 Expert
Hoi, super quick one.
A small windows .bat script that helps move the qml foler into the traktor 4 folder. This makes it easy to install a qml mod with a single click. For example to install a mod again after a traktor update.
Mod developers could also just put it into the .zip file for easy instlalation.
@echo off setlocal EnableDelayedExpansion :: Check for admin rights net session >nul 2>&1 if %errorLevel% == 0 ( goto :admin ) else ( echo Requesting administrative privileges... goto :UACPrompt ) :UACPrompt echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" exit /B :admin if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" ) pushd "%CD%" CD /D "%~dp0" set "SOURCE_DIR=qml" set "DEST_DIR=C:\Program Files\Native Instruments\Traktor Pro 4\Resources64" echo This script will copy the "%SOURCE_DIR%" directory to "%DEST_DIR%". echo Are you sure you want to proceed? echo Type 'Y' for Yes or any other key for No: choice /c YN /n >nul if errorlevel 2 ( echo Operation cancelled. goto :end ) if not exist "%SOURCE_DIR%" ( echo Error: Source directory "%SOURCE_DIR%" does not exist. goto :end ) if not exist "%DEST_DIR%" ( echo Error: Destination directory "%DEST_DIR%" does not exist. goto :end ) xcopy "%SOURCE_DIR%" "%DEST_DIR%\%SOURCE_DIR%" /E /I /Y if %ERRORLEVEL% equ 0 ( echo Directory copied successfully. ) else ( echo An error occurred while copying the directory. echo Error code: %ERRORLEVEL% ) :end echo. pause endlocal
Have fun.
Tagged:
6
Comments
-
Thanks a lot!!!
0 -
Thank you for your work. I will use this in the future. I think it would be good if a backup of the changed files were automatically created. I can add that when I have time.
1 -
The script now also creates a backup with a timestamp in the Resources64 directory.
3 -
Amazing! I'll likely be updating Screen Hack today and you've just wiped the faff factor. Thank you!
1
Back To Top
Categories
- All Categories
- 19 Welcome
- 1.3K Hangout
- 59 NI News
- 706 Tech Talks
- 3.6K Native Access
- 15.2K Komplete
- 1.8K Komplete General
- 4K Komplete Kontrol
- 5.2K Kontakt
- 1.5K Reaktor
- 354 Battery 4
- 783 Guitar Rig & FX
- 403 Massive X & Synths
- 1.1K Other Software & Hardware
- 5.2K Maschine
- 6.7K Traktor
- 6.7K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators