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

InstallShield support for C#


3 replies to this topic

mohan93

mohan93
  • Full Members
  • 2 posts

Posted 28 August 2014 - 11:33

Hello Guys,

Am new to this forum, this my first post.

Am working on a small C# automation, for accessing MSI database and updating etc.

I use the below code to access a MSI database.

WindowsInstaller.Installer inst = (WindowsInstaller.Installer)new Installer();
Database instDb = inst.OpenDatabase(msiFile.FullName, WindowsInstaller.MsiOpenDatabaseMode.msiOpenDatabaseModeTransact);

Now i have requirement for accessing ISM database. If i use same code above to access ISM database.

My queries:

 

  1. Is that both MSI and ISM database are same. (for accessing, updating tasks)
  2. Is that i need to add any InstallShield specific .dll i need to add to C# projects (like i do for Windows Installer MSI.dll) so that i can use Installsheild functions in my project to access ISM databse ?

 

Please assist.

Cheers,


Edited by Glytzhkof, 28 August 2014 - 17:30.
Formatting


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 28 August 2014 - 17:41

That code looks to be using DTF, is this correct? This is the best way to access a Windows Installer database file. See this answer for some details.

 

1: Yes, ISM and MSI are identical format, but an ISM has more custom tables to store Installshield's own, custom data.

2: I don't fully understand this question.


Regards
-Stein Åsmul

mohan93

mohan93
  • Full Members
  • 2 posts

Posted 01 September 2014 - 09:07

That code looks to be using DTF, is this correct? This is the best way to access a Windows Installer database file. See this answer for some details.

 

1: Yes, ISM and MSI are identical format, but an ISM has more custom tables to store Installshield's own, custom data.

2: I don't fully understand this question.

 

Glytzhkof, Thanks for your reply.

 

The above code is a C# .Net code, i use the above code to access MSI database. am successfull in that. (Because, i have added msi.dll as the reference in my C# project)

But when i try to access the ISM database with this same code i get the error. Seems i need to add Installsheild related .dll to my project to access ISM database.

 

which .dll in install sheild supports this ? please help



deramor

deramor
  • Full Members
  • 187 posts

Posted 04 September 2014 - 16:06

Are you trying to make edits to the project ism file? 

Installshield has a COM interface for doing this.  Review the ISWiProject object in the help.

 

What are you trying to edit in the project file specifically?