TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohan S
NA
34
38.9k
Issues with updating a MSI Database
Jun 3 2014 4:18 PM
Hello Guys,
Am writing a C# code to add values to MSI file Database.
Below is my code:
Used "Button" - Add (windows Form Application)
private void btApply_Click(object sender, EventArgs e)
{
FileInfo msiFile = new FileInfo(@"C:\temp\WinInstaller\Sample.Msi");
// open MSI database
WindowsInstaller.Installer inst = (WindowsInstaller.Installer)new Installer();
Database instDb = inst.OpenDatabase(msiFile.FullName, WindowsInstaller.MsiOpenDatabaseMode.msiOpenDatabaseModeTransact);
// query the database
WindowsInstaller.View view = instDb.OpenView("INSERT INTO Property (Property, Value) Values( 'Manufacturer', 'MyCompany')");
view.Execute(null);
view.Close();
}
When i run the code, i can click on Button - "Add" which executes with no error.
My MSI file time stamp also gets updated.
But changes are not getting reflected.
Please help.
Cheers,
Reply
Answers (
1
)
How to link a combo box items to a panel
How to add mutliple items to a list using the same button?