avhimkov
3/18/2017 - 8:13 AM

install font

install font

@echo off
SET username=Administrator
SET kassapass=password
echo. > failed.txt

for /f %%a in (computerslist.txt) do (
net use "\\%%a\c$" %kassapass% /user:%username%
IF not errorlevel 1 (
xcopy /i /s /y "ะก:\deploy\fonts\*" "\\%%a\c$\temp\fonts\"
IF not errorlevel 1 (
psexec -e \\%%a cmd /c ^(pushd c:\temp\fonts ^& fontreg.exe /copy^)
IF errorlevel 1 echo %%a psexecfailed >> failed.txt
) else (
echo %%a xcopyfailed >> failed.txt
)
net use "\\%%a\c$" /delete /yes
) else (
echo %%a netusefailed >> failed.txt
)
)