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

Get Destination from Custom Action


1 reply to this topic

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 03 August 2007 - 21:25

I need to be able to get the MS SQL Server Data path from somewhere so I can install some .mdf/.ldf files there. I don't know that path right off the bat and just can't make a simple registry query for it and therefore use the system search. (If it's SQL 2005, I first have to find the InstanceName and then use that to find the correct key.) Anyway, I have a dll I can call from a custom action that will provide the functionality no problem. How do I now get the path I get back from this dll from the custom action to a directory that I can install to? How do I set the Component to the correct dir?

I have thought about creating a dummy entry (or entries) in the Directory table and modifying it (them) when I run the custom action, but it seems that there is probably a better way to accomplish this.

Do I have to create/edit a row in the directory table in the msi database or is there an easier way like just setting a property? (I can't actually set the Destination to a property in the Component.)


Thanks!


BTW, does anybody know a better way of getting that SQL Data path than querying the registry?

-- spdygnlz --

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 07 August 2007 - 17:00

Nevermind. I guess I just didn't look hard enough to find the custom action type 35. It gave me what I was looking for.

-- spdygnlz --