Component comdlg32.ocx or one of its dependencies not correctly registered: a file is missing or invalid

I am getting this error when I tried to run my application on my friends pc . I copied this file COMDLG32.OCX’ from my laptop and tried to paste on that pc in System32 folder. but getting below error

This folder already contains a file named ‘COMDLG32.OCX’, WOULD YOU LIKE TO REPLACE THIS.

What would be the impact if replace the new file with existing file which is of higher version and more kb. Is there any other way to deal with this? This is also a case with other files like flexgrid, tabb control.

thanks

You should use an installer program to install your program on another computer. Your development environment has met all the dependencies; otherwise, your program would not run.

Use the Package and Deployment wizard. This should pick up all the dependencies and install the appropriate files needed for your program and ressiter them to run on a different computer.

The Package and Deployment Wizard, however, is really out of date. But it can be used as a basis for Visual Studio Installer 1.1 to make a Microsoft Installer (MSI) file.

Edited 4 Years Ago by hkdani

This article has been dead for over six months. Start a new discussion instead.