Scripting Question

VbScript that copy files in MSI

05/28/2017 1951 views

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

0 Comments   [ + ] Show comments


All Answers

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
Answered 05/28/2017 by: rad33k
Fourth Degree Brown Belt

  • 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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


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