I have a requirement to add a file and registry information of that file in the MSI (or) MSM.

Can we do it through VB script?

If Yes, can you please provide me a sample script to import the file and registry information in the MSI (or ) MSM.



1 Comment   [ - ] Hide Comment


  • I presume you don't have a proper MSI authoring tool, since all the major ones can import .REG files natively.

    If that's the case, you can use InstEdit or Orca to add the entries directly to the Registry table, either to the MSI (if it's "yours") or via a transform (if it's a vendor MSI).

    I doubt you'd find a ready-built script to do the job (given the above) but, if you want to persist, the Windows Installer part of the Platform SDK (or whatever MS is calling it this week) contains a few sample scripts of how to "talk" to the Installer.Installer object.
Please log in to comment

Answer this question or Comment on this question for clarity



set oFile  = CreateObject("scripting.FileSystemObject")   
set oShell = CreateObject("wscript.shell")
        if oFile.FileExists(sregfile) then
        iReturn = oShell.Run("regedit.exe /s" & sRegFile)

set ofile = nothing
set oshell = nothing

Answered 02/04/2014 by: nikegv@gmail.com
Senior Yellow Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja