From the code below, I want to associate the component "MyAppFolder" to the feature "MyFeature".
How to do that?
Code: Select all
$advinst = New-Object -ComObject AdvancedInstaller
$project = $advinst.CreateProjectS("architect")
$project.ProductDetails.Name = "MyApp"
$project.ProductDetails.Version = "3.0.0"
$project.ProductDetails.Publisher = "MyCompany"
$project.SaveAs("C:\Users\Administrator\Desktop\MyApp.aip")
$MyFeature = $project.OrganizationComponent.NewFeature("MyFeature")
$MyFeature.Directory = “MyAppDir”
$MyFeature.Parent = "APPDIR"
$MyAppFolder = $project.FilesComponent.AddFolderContentS(“APPDIR\MyAppDir”, “C:\Sources\MyAppFiles")
$project.Save()
Emmanuel