extraction zip %1 in c:\windows\fonts doesn t work
Posted: 19 Jan 2009 09:59
Hi
my code doesn't work i dont know why
you drop and drag fonts archive zip into batch file
OS : Vista
I have no error message
zipFiles.txt is empty
files are not extracted
the batch is frozen
but
but if I change the directory, my batch runs
why ?
thanks a lot for your help
Acris
my code doesn't work i dont know why
you drop and drag fonts archive zip into batch file
OS : Vista
@echo off
set zip=%programfiles%\7-zip\
set "Fonts=%systemroot%\Fonts"
set clefFont=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
attrib -r -h -s "%Fonts%"
cls &echo.&echo ==^> %~dpnx1
"%zip%\7z.exe" e "%~dpnx1" -r *.ttf *.otf -o"%Fonts%" -xr-!__MACOSX >> "zipFiles.txt"
attrib +r +s "%Fonts%"
for /f "tokens=1* delims= " %%v in (' type "zipFiles.txt" ^|find /i ".ttf"') do (REG ADD "%clefFont%" /v "%%~nw (TrueType)" /d "%%~nxw")
for /f "tokens=1* delims= " %%w in (' type "zipFiles.txt" ^|find /i ".otf"') do (REG ADD "%clefFont%" /v "%%~nx (TrueType)" /d "%%~nxx")
pause
I have no error message
zipFiles.txt is empty
files are not extracted
the batch is frozen
but
but if I change the directory, my batch runs
why ?
thanks a lot for your help
Acris