Search the Community
Showing results for tags 'binary table'.
-
Hi... I am trying to add a record in Binary Table in an MSI file. As Binary table has two fields/columns Name &Data , I am giving any string for Name(column 1) and streaming binary data from a VBS file into Data(column 2) . I have tried with VB script and it is working fine, Here is the VB Script file Dim Installer Dim Database Dim View Dim Record Dim query query="INSERT INTO `Binary` (`Name`, `Data`) VALUES ('NewBlob', ?)" Set Installer = CreateObject("WindowsInstaller.Installer") Set Record = Installer.CreateRecord(1) Record.SetStream 1, "C:\Users\Admin\Desktop\coder\CA_Test.vbs" Set Database = Installer.OpenDatabase("C:\Users\Admin\Desktop\7z920.msi", 1) Set View = Database.OpenView(query) View.Execute Record Database.Commit when i tried the same thing in autoit it is not working and it is not giving any syntax error. AutoIt file: #include <File.au3> $idVarInput_CAName="CA_Test" $filepath="C:\Users\Admin\Desktop\coder\CA_Test.vbs" $idVarInput_MSIPath="C:\Users\Admin\Desktop\7z920.msi" $value="?" Local $Query = "INSERT INTO Binary(Name,Data) VALUES('" & $idVarInput_CAName & "','" & $value & "')" $oInstaller = ObjCreate("WindowsInstaller.Installer") $oRec=$oInstaller.CreateRecord(1) $r=$oRec.SetStream(1,$filepath) $oDB = $oInstaller.OpenDataBase($idVarInput_MSIPath,1) $oView = $oDB.OpenView($Query) $oView.Execute($oRec) $oDB.commit() Please Help! Thanks...
- 1 reply
-
- binary table
- update
-
(and 2 more)
Tagged with: