Thank you, that helped.
I also noticed that it happens repeatedly after each machine restart, so I created this batch script, which needs to be executed as an administrator.
@echo off
setlocal enabledelayedexpansion
REM Define source and destination directories
set "source=%ProgramFiles%\DVDFab\StreamFab\CEF\WidevineCdm"
set "destination=%LocalAppData%\CEF\User Data\WidevineCdm"
REM Deleting the existing WidevineCdm folder
if exist "%destination%" (
echo Deleting existing WidevineCdm folder...
rd /s /q "%destination%"
if %errorlevel% neq 0 (
echo [ERROR] Failed to delete the WidevineCdm folder. Please check permissions.
) else (
echo Existing WidevineCdm folder deleted successfully.
)
) else (
echo No existing WidevineCdm folder found. Skipping deletion.
)
REM Copying the new WidevineCdm folder
echo Copying new WidevineCdm folder...
xcopy "%source%" "%destination%" /s /e /i /y
if %errorlevel% neq 0 (
echo [ERROR] Failed to copy WidevineCdm folder. Please check the source path and permissions.
) else (
echo New WidevineCdm folder copied successfully.
)
REM Verifying copied files by comparing SHA1 checksums
echo Verifying copied files using SHA1...
set "checksumOK=1"
for /r "%source%" %%f in (*) do (
set "srcfile=%%f"
set "dstfile=!srcfile:%source%=%destination%!"
if exist "!dstfile!" (
REM Generate SHA1 checksum for the source file
for /f "tokens=1" %%a in ('certutil -hashfile "!srcfile!" SHA1 ^| find /i /v "certutil"') do (
set "src_sha1=%%a"
)
REM Generate SHA1 checksum for the destination file
for /f "tokens=1" %%b in ('certutil -hashfile "!dstfile!" SHA1 ^| find /i /v "certutil"') do (
set "dst_sha1=%%b"
)
if not "!src_sha1!"=="!dst_sha1!" (
echo [ERROR] SHA1 mismatch for file: !srcfile!
set "checksumOK=0"
) else (
echo SHA1 OK for file: !srcfile!
)
) else (
echo [ERROR] File missing in destination: !dstfile!
set "checksumOK=0"
)
)
if "!checksumOK!"=="1" (
echo All files copied successfully with matching SHA1 checksums.
) else (
echo [ERROR] File verification failed. Please review the errors above.
)
REM Clean up temporary files (if any)
del src_checksum.txt 2>nul
del dst_checksum.txt 2>nul
REM Press enter to exit
echo Press Enter to exit...
pause
exit /b 0
This batch script: - Deletes the existing WidevineCdm folder from %LocalAppData%\CEF\User Data\.
- Copies the WidevineCdm folder from %ProgramFiles%\DVDFab\StreamFab\CEF\ to the same location.
- Verifies that files are copied correctly by comparing their SHA1 checksums between the source and destination.
- Displays errors if any step fails without immediately exiting.
- Prompts the user to press Enter to exit after completion.
It ensures both file integrity and error reporting during the process.
Quantumleap
FYI, if it shouldnt work, you will need to change this line:
set "source=%ProgramFiles%\DVDFab\StreamFab\CEF\WidevineCdm"
to this
set "source=%ProgramFiles%\StreamFab\StreamFab\CEF\WidevineCdm"