Wednesday, May 31, 2017

Registering all ocx files

I had an old app that is using windows controls ocx libraries, like comctl32.ocx, comdlg32.ocx And others
The program was complaining about missing comctl32.ocx, then i did register it with the below command, running it in elevated command prompt 
regsvr32 c:\Windows\SysWOW64\comctl32.ocx

Starting the app again it complained about another missing ocx. 


In that case it might be better to register all the ocx files in the SysWOW64 folder by running the below command

forfiles /p "c:\Windows\SysWOW64" /m *.ocx /c "cmd /c regsvr32 @file"

No comments:

Post a Comment