/build/static/layout/Breadcrumb_cap_w.png

Need a VB script to import the .reg file in the msi

Hi,

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.

Thanks,

Kumar


1 Comment   [ + ] Show 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. - anonymous_9363 10 years ago

Answers (1)

Posted by: nikegv@gmail.com 10 years ago
Senior Yellow Belt
0

set oFile  = CreateObject("scripting.FileSystemObject")   
set oShell = CreateObject("wscript.shell")
           
    sRegFile = "C:\WINDOWS\DESKTOP\ENTRY.REG"
       
        if oFile.FileExists(sregfile) then
        iReturn = oShell.Run("regedit.exe /s" & sRegFile)

set ofile = nothing
set oshell = nothing

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ