cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Cygnusx1
Level 8

Modify the Upgrade Table during runtime?

Is it possible to modify the Upgrade Table during an installation? I know I did this before but cannot find my code.
The following code allways fails at ModifyView.Modify:

Set ModifyView = Database.OpenView("SELECT * FROM Upgrade")
ModifyView.Execute
Set rec = Installer.CreateRecord(7)
rec.StringData(1) = ""
rec.StringData(2) = '""
rec.StringData(3) = "999.999.9999"
rec.StringData(4) = ""
rec.IntegerData(5) = 1024
rec.StringData(6) = ""
rec.StringData(7) = "REM_1"
ModifyView.Modify 7, rec
ModifyView.Close
Labels (1)
0 Kudos

(1) Reply
Cygnusx1
Level 8

This function works when placed in the immediate execution and when run in reduced UI.

Function MODIFY_DB(sNewVal)
Set ModifyView = Database.OpenView("SELECT * FROM Upgrade")
ModifyView.Execute
Set rec = Installer.CreateRecord(7)
rec.StringData(1) = sNewVal
rec.StringData(2) = ""
rec.StringData(3) = "999.999.9999"
rec.StringData(4) = ""
rec.IntegerData(5) = 1024
rec.StringData(6) = ""
rec.StringData(7) = "REM1"
ModifyView.Modify 7, rec
ModifyView.Close
End Function

This function is used to uninstall all Windows Instaler based Java versions from a user's computer (based on ProductName & Publisher).
0 Kudos