VbScript that copy files in MSI


I require a vbscript which can copy files from a particular location inside the msi/ism in a proper directory.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: rad33k 7 years ago
Fourth Degree Brown Belt
Can you describe your request/problem in more details? Do you installing this MSI or do you need to extract files without MSI installation?

I'm wondering why you can't install mentioned files to the right place in a standard MSI file installation way? If you need to create a copy of them, there is a DuplicateFile table.

Simple VBS code to copy files is as follows:
Dim oFSO
Dim strSource, strDest

Set oFSO = CreateObject("Scripting.FileSystemObject")
strSource = "c:\SourceFolder\tmp.txt"
strDest = "C:\DestFolder\" 'If you do not want to change the file name you can specify the directory name only with backslash (\) at the end

If oFSO.FileExists(strSource) Then
oFSO.CopyFile strSource, strDest
End If

  • No I want to insert files inside the MSI through scripting...Instead of copying file manually inside MSI/ISM one by one can there be a script which copy bulk of files in ISM/MSI - Viveks 7 years ago
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