没心没肺,长命百岁~~~
关于组件注册的两个小代码
上一篇 /
下一篇 2007-11-14 10:16:19
/ 个人分类:installshield笔记
if (Is(FILE_EXISTS, WINSYSDIR ^ "COMCTL32.OCX") = 0)then
XCopyFile ( SUPPORTDIR ^ "COMCTL32.OCX" , WINSYSDIR, CLEAR_FILE_ATTR);
szCommand ="regsvr32.exe /s";
szCmdLine=WINSYSDIR^"COMCTL32.OCX";
if (LaunchApp(szCommand, szCmdLine)< 0)then
MessageBox("Launch regsvr32 failed.", SEVERE);
else
MessageBox("注册成功", SEVERE);
endif;
else
MessageBox("file exist", SEVERE);
endif;
//////
if (Is(FILE_EXISTS, WINSYSDIR ^ "COMCTL32.OCX") = 0)then
XCopyFile ( SUPPORTDIR ^ "COMCTL32.OCX" , WINSYSDIR, CLEAR_FILE_ATTR);
if (LaunchApp("Regsvr32"," -s" +"'"+ WINSYSDIR^"COMCTL32.OCX"+"'")< 0)then
MessageBox("Launch regsvr32 failed.", SEVERE);
else
MessageBox("注册成功", SEVERE);
endif;
else
MessageBox("file exist", SEVERE);
PS: 不能用regsvr32来注册, VBACV10D.L。如下图,否则安装的时候会报错。
收藏
举报
TAG:
installshield笔记