我有一个vb6 activex文档项目,我需要创建一个不需要任何用户界面和用户干预的msi包(因为它必须通过active目录部署)。我遵循了以下步骤:
另一个要求是,安装后我需要运行另一个自解压缩的exe。该自提取器将查看上面的注册表条目,并在App路径上提取(覆盖)文件。
因此,使用自定义操作,我将update.exe设置为安装后运行。
现在,当我运行msi时,它运行良好,安装后运行update.exe,一切都运行良好,但只是有时。我无法预测它什么时候工作,什么时候不工作。当我在其他几台机器上尝试相同的msi时,它在一些机器上工作,而在另一些机器上不起作用。当我检查“添加或删除程序”时,这个应用程序有很多条目。
我已经为这个msi项目挣扎了一段时间,现在我感到无助。我不知道我做错了什么。如果有人能给我指明正确的方向,我将不胜感激。
是否有其他方法无需提示而为vb6 activex文档项目创建安装包?
发布于 2011-06-10 19:20:20
这对于我使用MSI来安装ActiveX dll文档是可行的:
这一答复有点晚,但我也为此挣扎了大约一年,然后才开始工作。在另一台PC上安装时,关键似乎是注册ActiveX exe或dll。下面的内容对我很有用;我只列出了dll的步骤,但是还没有100%成功地使用exe:
。
完成所有操作后,由于您的dll已注册,IE应该能够启动您的ActiveX文档。
代码:
Sub Main()
Dim strTemp As String
'ok, it may be Vista or Windows 7...
strTemp = "C:\Program Files (x86)\Internet Explorer\"
If CheckFileFolderExists(strTemp, False) = True Then
'ok, use older version of IEXPLORE to run this on Win7 (or Vista)...
Shell "C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE " & App.Path & "\UserDocument1.vbd", vbMaximizedFocus
Else
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE " & App.Path & "\UserDocument1.vbd", vbMaximizedFocus
End If
End Sub
Function CheckFileFolderExists(strName, fFile) As Boolean
' The fFile variable determines whether you're
' looking for a File (True) or Folder(False)
' The strName variable holds the fully qualified
' path you're looking for
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
CheckFileFolderExists = False
If fFile = True Then ' It's a file
If fso.FileExists(strName) = True Then
CheckFileFolderExists = True
Exit Function
End If
Else ' It's a folder/directory
If fso.FolderExists(strName) = True Then
CheckFileFolderExists = True
Exit Function
End If
End If
Set fso = Nothing
End Function
https://stackoverflow.com/questions/3385380
复制相似问题