I need it to look for a specifically named folder (call it "custom" for this example) included alongside the MSI and, if found, copy that folder to the installation location.
( C:\SetupFiles\MyProgram.msi | C:\SetupFiles\custom )
The "custom" folder will contain files specific to the computer the MSI is being installed on and will be different for each we run it on.
I want to copy the entire folder and place it as a child-folder under where the MSI is installing the program files to.
( C:\ProgramFiles\MyProgramDir | C:\ProgramFiles\MyProgramDir\custom )
I have VB code that illustrates what I want done, but I don't want to use VB code to preform what I believe the MSI can do on its own.
(My need sounds similar to this: http://www.advancedinstaller.com/user-g ... -file.html)
Code: Select all
Function CustomCopy()
Dim instPath, customPath, folder
instPath = Session.Property("APPDIR")
customPath = Session.Property("CUSTOMDIR")
LogVBS "------ CustomCopy ------"
LogVBS " APPDIR=" & instPath
LogVBS " CUSTOMDIR=" & customPath
Set fsObj = CreateObject("Scripting.FileSystemObject")
' CUSTOMDIR folder exist?
If fsObj.FolderExists(customPath) Then
LogVBS " CUSTOMDIR exists"
If fsObj.FolderExists(instPath) then
LogVBS " APPDIR exists."
Set folder = fsObj.GetFolder(customPath)
LogVBS " Copying CUSTOMDIR into APPDIR."
folder.Copy instPath, true
LogVBS " Copy complete."
Else
LogVBS " ERROR: APPDIR doesn't exist."
End if
Else
LogVBS " CUSTOMDIR missing, nothing to copy."
End if
End FunctionI need to make sure this will work for deployment via a Computer GPO, so it must obtain the correct permissions to write.
Thanks.
FOLLOW US
Get the latest news in Application Packaging