Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$MSIObject = CreateObject Win32::OLE 'WindowsInstaller.Installer'; if (defined ($MSIObject)) { print "Object Available\n"; $dbReference = $MSIObject->OpenDatabase("C:\\temp\\AppsenseApplica +tionManager.msi", 1); # Create SQL query to obtain required data $query = "SELECT * FROM Feature WHERE Feature = " . "'Agent'"; # Create a database view based on the query $view = $dbReference->OpenView($query); # Execute the query $results = $view->Execute(); # fetch the first data set based on the query $record = $view->Fetch(); if ($record) { print "Field = " . $record->StringData(0) . "\n"; print "Field = " . $record->StringData(1) . "\n"; print "Field = " . $record->StringData(2) . "\n"; print "Field = " . $record->StringData(3) . "\n"; print "Field = " . $record->StringData(4) . "\n"; print "Field = " . $record->StringData(5) . "\n"; print "Field = " . $record->StringData(6) . "\n"; print "Field = " . $record->StringData(7) . "\n"; print "Field = " . $record->StringData(8) . "\n"; } else { print "Record is undefined!\n" } print $record->FieldCount(); $newRecord = $MSIObject->CreateRecord($record->FieldCount()); **** FAILS to assign this value **** $newRecord->IntegerData(1) = 0; $record->Modify(6, $newRecord);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with OLE module and MSI files
by BrowserUk (Patriarch) on May 03, 2007 at 16:30 UTC | |
by perls_of_joy (Initiate) on May 08, 2007 at 10:51 UTC | |
by BrowserUk (Patriarch) on May 08, 2007 at 14:07 UTC | |
|
Re: Help with OLE module and MSI files
by shigetsu (Hermit) on May 03, 2007 at 16:34 UTC |