Kontakt快速一键入库脚本

在音源根目录下创建一个任意文件名.bat,然后输入以下内容
@echo off
:begin

cls
setlocal enabledelayedexpansion

set var=123456789
set /a h1=%random%%%9+1
set var=!var:%h1%=0!
for /l %%i in (9,-1,7) do (
set /a temp=!random!%%%%i
call set h%%i=%%var:~!temp!,1%%
call set var=%%var:!h%%i!=%%)
echo 随机产生的键值为k2lib0%h1%%h9%%h8%
set last=%h1%%h9%%h8%
set over=k2lib0%last%
echo %over%
pause
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Native Instruments\Content" /v "%over%"')do echo 已经存在键值,重新随机 && pause && goto begin
for /f "delims=" %%i in ("%cd%") do set folder=%%~ni
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Native Instruments\Content" /v %over% /t REG_SZ /d "%folder%" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Native Instruments\%folder%" /v ContentVersion /t REG_SZ /d "1.0" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Native Instruments\%folder%" /v ContentDir /t REG_SZ /d "%cd%" /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Native Instruments\%folder%" /v Visibility /t REG_DWORD /d "00000003" /f
del "%folder%_info_1.txt" /q
del "%folder%_info_2.txt" /q
del "%folder%_info.nkc" /q
del "%folder%_info.nkx" /q

type nul>> "%folder%_info_1.txt"
type nul>> "%folder%_info_2.txt"
rename "%folder%_info_1.txt" "%folder%_info.nkc"
rename "%folder%_info_2.txt" "%folder%_info.nkx"
pause

双击运行后 打开Kontakt即可看到你的音源,很方便吧!
欢迎喜欢MIDI和音乐制作的二次元小伙伴加入413244177 一起交流吧!

3
打赏
135
1
吐槽
转贴到:

- 评论

我要吐槽