How to register your own or the third ActiveX Control to the target PC using InstallShield 11.5 Pre Edition?

来源:互联网 发布:api原油数据 编辑:程序博客网 时间:2024/06/05 17:15

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