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

Updating MSI database table during runtime


5 replies to this topic

bhagelin

bhagelin
  • Members
  • 22 posts

Posted 27 January 2006 - 20:13

I want to edit one field value in the MSI table ""Control" so that I can disable a control on a dialog during runtime.

I've started a thread regarding this, but I believe there may be a better way to go about this than what was suggested:

http://community.ins...955&page=2&pp=5

In the help files I've found information on msi functions that allow me to use sql commands on the msi database during runtime -- such as the "MsiViewModify" function. Am I heading in the right direction?

I'm a bit confused on how I actually connect to the running msi database. I've looked at "MsiGetActiveDatabase(hInstall)" but I don't understand how I get a value into the "hInstall" variable that contains the handle to my msi database.

Can anyone help me, or point me towards a resource that has instructions on how to do this?

Thanks smile.gif

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 30 January 2006 - 11:41

In that thread you linked to, the discussion is about a InstallScript MSI project. This project type doesn't use Windows Installer UI controls or tables at all, it uses InstallScript as "external UI". So you need to do it in InstallScript, not by manupulating the msi tables.
In a Basic MSi project using control condition would be the recommended way.

bhagelin

bhagelin
  • Members
  • 22 posts

Posted 30 January 2006 - 23:01

That's interesting, because when I change that table value in the direct editor, it disables the control in the UI. Isn't the direct editor an interface to the MSI database?

How would a control be disabled in InstallScript?

Thanks

Edited by bhagelin, 30 January 2006 - 23:07.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 01 February 2006 - 10:10

Which project type are you using? What is displayed in the title bar of the InstallShield IDE (when your project is open)?

bhagelin

bhagelin
  • Members
  • 22 posts

Posted 01 February 2006 - 18:24

This project is being built in Visual Studio .NET, with the InstallShield application accessable through the VS.NET IDE. Because of this, the InstallShield project type does not appear in the title bar.

I do believe however, that the project type is in fact InstallScript MSI -- I made that determination based upon the InstallShield features available. Is there another way to check the project type?

Thanks,

B

bhagelin

bhagelin
  • Members
  • 22 posts

Posted 01 February 2006 - 18:51

I've deployed a workaround for that InstallScript MSI project for the time being.

Now, I have the same issue but with an InstallScript project. Is there a way I can enable/disable dialog controls during runtime with InstallScript? I suppose I'll post this in the InstallScript section...

Edited by bhagelin, 01 February 2006 - 18:52.