Some students asked this question ,here I give the answer.
1. the most easy way,we use the guide. After you append your ocx or dll files ,you select one ,in the properties dialog you will see one option--"Self Register",if you tick this option,the final setup will register your selected dll or ocx file to the target PC. There is a premise to make the method run OK--the ocx or dll should be self-registeralbe.
Here is the running pic:

2.Another way,we use the InstallScript.
Here is the code:
string yourPath;
yourPath = TARGETDIR;
LongPathToShortPath(yourPath);
LaunchAppAndWait(WINSYSDIR ^ "RegSvr32.exe",yourPath ^ "*.ocx",WAIT);
This method can solve most registering cases.
Nasky
本文介绍了两种在目标计算机上注册OCX或DLL文件的方法:一种是通过设置属性中的SelfRegister选项进行简单注册;另一种是使用InstallScript代码来执行注册过程。这两种方法能够覆盖大多数注册场景。
3774

被折叠的 条评论
为什么被折叠?



