Jump to content

Vijaya7890

Members
  • Posts

    3
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Vijaya7890's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. 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...
  2. Sorry, You didn't understand the requirement properly. In general, we will be having a vbscript file and we need to copy its contents to create a custom action in msi through custom action table. Which we will do manually using msi editing tools like orca or installshield. As msi is a database, we want to automate this process as if user provides a vbs, it should automatically embed to the msi as a vbscript custom action. Hope you understood the requirement.We are not trying to add this vbscript file as a installable file in msi. We want to get it embedded in a custom action to use its internal logic. Any Help..!
  3. Hi Everyone, I am from Repackaging background and working on a scenario where i need to write the data which is stored in an array into a specific column in MSI Table called "Custom Action". Please assist me how to proceed.
×
×
  • Create New...