答:VB“展开与打包向导”所生成的安装程序的工作步骤是这样的:先运行Setup.exe,这个程序将VB的运行库安装到用户的机器上,同时将.cab文件中的文件释放到临时目录中,然后再调用临时目录中Setup1.exe完成余下的安装工作。Setup1.exe是由VB写的(正是这个原因所以要先安装VB的运行库),其源程序可以在VB98WizardsPD WizardSetup1中找到。如果你对VB的安装程序不满意,希望添加新功能,可以直接修改Setup1.vbp。具体到你的问题,在VB中可以打开Setup1.vbp,然后修改Setup1.frm的Form—Load事件,在其中可以找到如下几行:
‘Create program icons (or links, i.e. shortcuts).
If (fMainGroupWasCreated = True) Or ((cIcons > 0) And TreatAsWin95()) Then
ShowStaticMessageDialog ResolveResString(resPROGMAN)
CreateIcons gsICONGROUP
‘Do the same for other sections in SETUP.LST if you′ve added your own.
CreateIcons ″MySection″
CreateIcons ″MyOtherSection″
End If
The file ′<Windows System Folder>$(DLLSelfRegisterEx)′ could not be registered because it was not found.
如果运行Visual Basic 6.0生成的安装盘,会产生下面的错误:
The file ′<TEMP Folder>Msftqws.pdw$(DllSelfRegisterEx)′ could not be registered because it was not found.
这个问题发生在分发Microsoft Calendar control(MSCal.ocx)时。MSCal.dep文件中的"Register="行被错误地设置成 $(DLLSelfRegisterEx)了。
解决办法如下:
1. 使用记事本打开Setup.lst文件。Setup.lst文件是Setup Wizard或PDW制作安装盘时生成的。
2. 查找$