Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Writing from InstallScript to MSI Database


4 replies to this topic

MNJon

MNJon
  • Members
  • 11 posts

Posted 30 December 2003 - 17:49

Does anyone have a code snippet or advice on easily writing results from an InstallScript custom action to the MSI database?

Specifically, I am attempting to list the SQL Servers available in a listbox in a Basic MSI project. I found a great code snippet here on InstallSite that will list the SQLServers, but I need to be able to write the results back to the listbox table in the MSI database.

I'm a relative novice at InstallScript.

Thanks in advance!
John

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 31 December 2003 - 09:13

In your InstallShield program directory under Samples\ScriptSamples you'll find a .rul file that includes a function to add entries to a combo box. List boxes work quite similar to combo boxes.

MNJon

MNJon
  • Members
  • 11 posts

Posted 31 December 2003 - 17:53

Thank you! I wasn't aware of the code samples that were installed with InstallShield.

I'm having a little problem getting the sample code to run. I can step through the code with no errors, but nothing seems to get written back to the ComboBox table. Shouldn't I be able to see these entries in the ComboBox table of the MSI file being executed in the temp folder?

I'm not a whiz in InstallScript and am likely missing something basic - any ideas?

Thanks GREATLY in advance for your help!

John Frid

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 31 December 2003 - 18:44

The SDK states that the database cannot be changed at runtime. You can only add, modify, remove temporary rows, columns or tables from a database. I assume this means that any changes you do will be "in memory" only and never be persisted to disk.
Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 02 January 2004 - 21:08

http://www.installsh...s/msiaccess.asp
Regards
-Stein Åsmul