-
Notifications
You must be signed in to change notification settings - Fork 0
/
H264_HEVC_DRM_Test.bat
82 lines (66 loc) · 3.29 KB
/
H264_HEVC_DRM_Test.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
@echo off
setlocal EnableDelayedExpansion
REM supported architecture amd64, x86
set arch=amd64
if /i '%1'=='amd64' (
set arch=amd64
)
if /i '%1'=='x86' (
set arch=x86
)
REM Clean up
del /F /Q *.wtl
del /F /Q wttsdk.log
REM Prepare content files
mkdir .\DXVAContent
xcopy .\DXVAContentRoot\*.* .\DXVAContent /Y
REM Add CP reg
cmd /c REG ADD "HKLM\SOFTWARE\Microsoft\Windows Media Foundation\ContentProtection" /f /v EnableClassicActivationOfITA /t REG_DWORD /d 1
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::H264DRMTest1 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl H264DRMTest1.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::H264DRMTest2 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl H264DRMTest2.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::H264DRMTest3 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl H264DRMTest3.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::H264DRMTest4 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl H264DRMTest4.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::H264DRMTest5 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl H264DRMTest5.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::HEVCDRMTest6 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl HEVCDRMTest6.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::HEVCDRMTest7 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl HEVCDRMTest7.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::HEVCDRMTest8 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl HEVCDRMTest8.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::HEVCDRMTest9 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl HEVCDRMTest9.wtl
.\%arch%\TE.exe /enablewttlogging /appendwttlogging .\amd64\mftdmediaengine.dll /name:CMediaEngineTests::HEVCDRMTest10 /p:"ContentSource=./DXVAContent" /p:"GUID=#{DETECT}#"
ren Te.wtl HEVCDRMTest10.wtl
REM Remove content files
rmdir /S /Q .\DXVAContent
REM Del CP reg
cmd /c REG DELETE "HKLM\SOFTWARE\Microsoft\Windows Media Foundation\ContentProtection" /f
:end
endlocal
echo off