I have a script I use to use for Windows XP but seems some batch commands have changed.. I want to be able to toggle on/off DirectX in Windows 7. Anyone know if this works in Windows 7 and how to fix the script?
Title "Toggling DX Mode"
::Mode CON: COLS=35 Lines=5
Reg query HKLM\SOFTWARE\Microsoft\DirectDraw|Findstr /I "emulationonly">Nul
If %Errorlevel%==1 (Set _CurMode=0x0)&Goto _Test
For /F "Tokens=3 skip=3" %%I In ('Reg query HKLM\SOFTWARE\Microsoft\DirectDraw /V EmulationOnly') Do Set _CurMode=%%I
If %_CurMode%==0x0 (Set _Setting=Disable) Else (Set _Setting=Enable)
::Set Mode=1 to Disable, Mode=0 to Enable
If /I "%_Setting%"=="Disable" Set _Mode=1
If /I "%_Setting%"=="Enable" Set _Mode=0
Reg Add HKLM\SOFTWARE\Microsoft\DirectDraw /V EmulationOnly /T REG_DWORD /D %_Mode% /F>Nul
Reg Add HKLM\SOFTWARE\Microsoft\Direct3D\Drivers /V SoftwareOnly /T REG_DWORD /D %_Mode% /F>Nul
Echo Acceleration has been %_Setting%d
Ping 188.8.131.52 -n 1 -w 5000>Nul
I keep getting the error (Set was unexpected at this time. this happens after the line...
For /F "Tokens=3 skip=3" %I In ('Reg query HKLM\SOFTWARE\Microsoft\DirectDraw /V EmulationOnly') Do Set _CurMode=%I