What to include and how to install?
I have a small chat program that I have finished...
I want to create the Smallest possible install.. and I dont want to use the P&D.
I am using the standard controls.. which I know need no install.. the exe will run on its own..
but I am also using the
INET (msinet.ocx .. do I need the oca file too?)
WINSOCK (MSWINSCK.OCX.. also.. oca?)
RTB (RICHTX32.OCX .. also.. include oca?)
controls as well...
do I need the oca's? and If I Include these in the zip...whats the best way to register them.. can it be done silently?
Thanks!
Re: What to include and how to install?
Registration can be done silently with the /s switch when using regsvr32.exe.
Quote:
Originally Posted by MSDN
Each ActiveX control is accompanied by a file with an .oca extension. This file stores cached type library information and other data specific to the control. The .oca files are typically stored in the same directory as the ActiveX controls and are recreated as needed (file sizes and dates may change).
Re: What to include and how to install?
/s .. perfect...
I just took the 3 controls...
incl them in my zip....
then I will test if they exist in the system32 directory... if not.. copy them in
then reg them... great thanks!!
Re: What to include and how to install?
so.. what do u think.. will this work ok?
I tried to test it by unreging the ocx's then deleting them
seemed to work fine...
getsys function
VB Code:
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Function GetSys() As String
Dim Path As String, strSave As String
strSave = String(200, Chr$(0))
GetSys = Left$(strSave, GetWindowsDirectory(strSave, Len(strSave)))
End Function
code for test / reg
VB Code:
cmdInstall.Enabled = False
Dim wPath As String
status "checking for system32 directory"
wPath = GetSys & "\system32\"
status "Checking for controls..."
If Len(Dir(wPath & "RICHTX32.OCX")) = 0 Then
status "Copying and registering RICHTX32.OCX"
FileCopy App.Path & "\RICHTX32.OCX", wPath & "RICHTX32.OCX"
Shell "regsvr32.exe /s " & wPath & "RICHTX32.OCX"
End If
If Len(Dir(wPath & "MSWINSCK.OCX")) = 0 Then
status "Copying and registering MSWINSCK.OCX"
FileCopy App.Path & "\MSWINSCK.OCX", wPath & "MSWINSCK.OCX"
Shell "regsvr32.exe /s " & wPath & "MSWINSCK.OCX"
End If
If Len(Dir(wPath & "msinet.ocx")) = 0 Then
status "Copying and registering msinet.ocx"
FileCopy App.Path & "\msinet.ocx", wPath & "msinet.ocx"
Shell "regsvr32.exe /s " & wPath & "msinet.ocx"
End If
status "I think it worked! Click RUN!"
cmdRun.Enabled = True
Re: What to include and how to install?
But dont you also need to test for file version? You dont want to disregard the ocx just because it exists? This is what the P&D Wiz does as well as other installers.
Re: What to include and how to install?
good thinking... but this app will only be going on a couple machines..
all are new with XP SP2 on them.. if it has the file.. it "should" be the latest :) I would hope!!! LOL
Re: What to include and how to install?
If it is only going on a couple of machines then you could manually verify the date/time stamps on these controls to ensure they have the latest.
Re: What to include and how to install?
I could... if I were able to.. the machines are not here...
:D
well.. I'll give it a shot.. if it fails.. then I try again! lol
;)
Re: What to include and how to install?
Quote:
Originally Posted by Static
I could... if I were able to.. the machines are not here...
:D
well.. I'll give it a shot.. if it fails.. then I try again! lol
;)
Well, Ok...then you could programmatically check the date/time stamp and compare it to the date/time stamp of what needs to be installed.
Re: What to include and how to install?
Wouldnt it be better to still create a setup package? It will check the versions for you and install only if they are needing to be updated.
Re: What to include and how to install?
yes.. but setup packages can get large....
1 person only has dialup.. and it will take forever.. so I am trying to keep it as small as possible.
right now.. the 2 exe's and 3 ocx's zipped is only 300K
the P&D makes it 1.8MB....
on a side note.. the P&D wanted to inlcude RICHTX32.DLL ?? do I need this!!??
Re: What to include and how to install?
It may be a supporting dll for the RICHTX32.ocx.
Use Depends.exe on the ocx and see what its dependancies are.
Re: What to include and how to install?
Depends.exe?? where is this?
Re: What to include and how to install?
Its in the "?:\Program Files\Microsoft Visual Studio\Common\Tools\DEPENDS.EXE" location.