View Single Post
Old 10th January 2018, 04:46   #3072  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
RE: mscomctl_reg.bat

Alright, I agree that turning off UAC completely may be a bit much for the average user (although I am a big fan of it)...

I made a new version of mscomctl_reg.bat which should overcome the issues (Stackoverflow is your friend...)

Code:
@ECHO OFF
SETLOCAL
REG ADD HKLM /F>nul 2>&1
IF ERRORLEVEL 1 GOTO noAdmin

SET Lib_DRIVE=%~d0
SET Lib_PATH=%~p0
%Lib_DRIVE%
CD "%Lib_PATH%"

REG QUERY "HKLM\Hardware\Description\System\CentralProcessor\0" | FIND /i "x86" > NUL && SET OS=32BIT || SET OS=64BIT

IF %OS%==32BIT SET syswindir=%windir%\System32
IF %OS%==64BIT SET syswindir=%windir%\SysWOW64

IF NOT EXIST "%syswindir%\mscomctl.ocx" COPY mscomctl.ocx "%syswindir%"

regsvr32 /u "%syswindir%\mscomctl.ocx"
regsvr32 "%syswindir%\mscomctl.ocx"
GOTO :EOF

:noAdmin
ECHO This script must run with elevated privileges, so:
ECHO.
ECHO   right click on it, choose "run as administrator"
ENDLOCAL
ECHO.
ECHO.
ECHO.
PAUSE
Tested under WinXP and Win7 64-bit with UAC ON and UAC OFF. Works well, no idea about Win8 or Win10 though...

It won't help if a previous broken or incompatible mscomctl.ocx is present. In this case the suggestions in the A2D help file need to be applied.



BTW if you are gearing up for the next stable version please consider using the latest ffms2 by qyot27 from here:
https://forum.doom9.org/showthread.p...61#post1829061


Cheers
manolito

Last edited by manolito; 10th January 2018 at 12:19.
manolito is offline   Reply With Quote