Login  
Search All Forums
Dart Home | PowerTCP FTP for ActiveX | Custom Development Reply | PowerTCP FTP for ActiveX Topics | Forums   
AuthorForum: PowerTCP FTP for ActiveX
Topic: InstallShield Does not Register Dart DLL's
daliaessam

From: cairo, USA
Posts: 19
Member Since: 01/20/06
posted February 9, 2006 1:18 PM

I used Install Shield Express to Package a VB 6 project, the project works well using VB Package and Deployment Wizard, With InstallShield I get DartSock.dll not registered error, same for all Dart DLL's only. Searching InstallShield website, I sloved this 2 ways but each is none practical, The first is not to use Dynamic linking for files When building and select the option "Self-Register" in installed shield, This method works well but the problem is installShield will Register these DLL's at the location they are located for packaging, this breaks your VB6 project dependency if it is on the same machine which I do.

The second method is to use a Custom program or VBscript as a custom action in InstallShield which I used, I'll post the code at the end of this post, The code I did also worked well, but has 2 problems, the first you need to merge VBscipt run time modules which adds I think about 1.5 MB not sure, the second problem is, the target machines AntiVirus PopsUp saying Malicious Script Detected during installation and the customer of course will never trust something like this.

The questions now:

1)-Is there a better way than what I spent 2 days now and none good.

2)-Is there a way to prevent InstallSHield from Registering the controls when building the package and breaking the VB dependency.


Code I wrote is:
(By the way, I know most the time I'll not get an answer here but may be some one will share)

  
Option Explicit

RegUnRegisterControls True

Function RegUnRegisterControls (RegUnregFlag)
On Error Resume Next

Dim ControlsFiles

  ControlsFiles = Array("DartCertificate.dll", "DartFtp.dll", "DartRas.dll", "DartSecure2.dll", _
              "DartSock.dll", "DartWebASP.dll", "DartWebUtil.dll", "DartZip.dll")

  Dim sSystemFolder, RegUnreg
  Dim File, FilePath, fs, Result

  sSystemFolder = Session.Property("SystemFolder")
  Set fs = CreateObject("Scripting.FileSystemObject")
  Result = ""
  
  'If WScript.Arguments.Count = 0 Then RegUnreg = 1
  'RegUnreg = 0   ' 0 = Register controls, 1 = UnRegister controls

  For Each File In ControlsFiles
    FilePath = sSystemFolder & File
    If fs.FileExists(FilePath) = True Then
      If RegUnregFlag = True Then
        RegisterControl (FilePath)
        'MsgBox "Registered File: " & FilePath
      Else
        UnRegisterControl (FilePath)
        'MsgBox "UnRegistered File: " & FilePath
      End If
    Else
      'MsgBox "Can not find file: " & FilePath
      Result = Result & "Can not find file: " & FilePath & vbCrLf
    End If
  Next

  Set fs = Nothing
  If Result <> "" Then
    MsgBox Result
  End If
End Function

Function RegisterControl(strControlPath)
  Dim objSh, lRet
  Set objSh = CreateObject("WScript.Shell")
  'WshShell.Run strCommand, [intWindowStype], [bWaitOnReturn]
  lRet = objSh.Run("regsvr32 /s " & strControlPath, 0, True)
  Set objSh = Nothing
  RegisterControl = lRet
End Function

Function UnRegisterControl(strControlPath)
  Dim objSh, lRet
  Set objSh = CreateObject("WScript.Shell")
  lRet = objSh.Run("regsvr32 /s /u " & strControlPath, 0, True)
  Set objSh = Nothing
  UnRegisterControl = lRet
End Function
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted February 9, 2006 4:39 PM

I can't really comment on what Installshield does because I don't use it, but what I can tell you is that the VB dependency info comes from the file called DartSock.dep (for the DartSock dll) which VB looks for in the directory where the dll is registered.

I am not exactly sure why any of this is a problem anyway. How often would this situation realistically occur? If I were testing my setup program, I would use another machine so as not to conflict with my development environment.

daliaessam

From: cairo, USA
Posts: 19
Member Since: 01/20/06
posted February 9, 2006 4:52 PM

For now I'll live with packaging with Vb Deployment wizard to avoid any problems.
Thanks
Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX