View Full Version : Something that should be easy but...

10-08-2007, 09:59 AM
I'll try to break down the scenario as best I can.

1. We need a single install file that we can email or have downloaded from the web.
2. We have a Visual FoxPro Application thats needs installing. (Done)
3. We need it to install all drivers and database links. (Done)
4. We need it to be able to install over old versions that were not installed by InstallShield (The FoxPro installer was used for many years.) (NOT DONE)
5. We also need it to be able to install over the same exact version of our application. (EX. Incase of file corruption or deletion we want to be able to install over the top of our app to put the files back.) (NOT DONE)
6. The problem with #5 is it always asks to Modify/Repair/Remove or says something like "A product already exists please Remove from the Add/Remove Programs list...." instead of just overwriting the files and just doing it. (And YES I have already set the File Properties to OverWrite All.)

Things I've tried:
1. Tried using the upgrade path but doesn't fix the issues of applicaitons not installed by InstallShield.
2. I tried using Custom Actions but could only get the VBScripts to run on new installs not reinstalls.
3. Tried using Overwrite file settings but it changed nothing.

Side Notes:
A few limitations that i've learned from Macrovisions support and sheer messing around is you CANNOT use Custom Actions while using Dynamic File Linking and you can not set the file properties to always overwrite either.

Does anyone have any clue? I have provided my VBScript below which works only on new installs and not when you run it again. Its like the Installer just skips it. I put message boxes in so i can see some sort of feedback from the custom action. It seems that I am missing something extremely obvious but i can figure out what it is. There has to be a way to allow an overwrite no matter whats there, we can not remove the old versions because of user data that has been created. Hopefully I was able to describe the situation so someone can help but i would be glad to describe it more if needed.

Frustrated InstallShield User Signing Off...
FieldPro ~

Option Explicit
ON Error Resume Next

'Should run no matter if it is a new install or reinstall...

Dim objShell
Dim strProductID, strProductKey, strFullPath
Dim strResult

strProductID = "{64B07931-6B51-4C36-9D55-EB76CDDF63A6}"
strProductKey = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\"

strFullPath = strProductKey & strProductID & "\DisplayName"
Set objShell = CreateObject("WScript.Shell")
strResult = objShell.RegRead(strFullPath)

if (Err.Number <> 0) Then
Session.Property("REINSTALL") = ""
Session.Property("REINSTALLMODE") = "omus"
Msgbox("New install")
Session.Property("REINSTALL") = "ALL"
Session.Property("REINSTALLMODE") = "voums"
End If