*-- program to create executables from data in projects.dbf LOCAL lcSourceDir, lcInstallDir, lBuild SELECT 0 USE Projects SET FILTER TO recompile modify project genericproj nowait save noshow noprojecthook IF type("_vfp.activeproject") = "O" then SCAN lcSourceDir = ALLTRIM(Projects.SourceDir) + "\" lcInstallDir = ALLTRIM(Projects.InstallDir) + "\" WITH _vfp.ActiveProject *-- change the icon .Icon = lcSourceDir + ALLTRIM(Projects.Icon) + ".ico" *-- main menu may differ between programs so delete it and add the appropriate one *--find the mainmenu and remove it FOR EACH loFile IN .Files IF UPPER(RIGHT(loFile.Name,12)) = "MAINMENU.MNX" THEN loFile.Remove() ENDIF ENDFOR *-- add in appropriate menu .Files.Add(lcSourceDir + "MainMenu.mnx") *-- include the menu in the project .Files("MainMenu.mnx").Exclude = .F. *-- rebuild the project * Object.Build([cOutputName] [, nBuildAction] [, lRebuildAll] [, lShowErrors] [, lBuildNewGUIDs]) *nBuildAction = 3 to build exe lBuild = .Build(lcInstallDir + ALLTRIM(Projects.ExeName), 3, .f., .t.) ENDWITH IF lBuild THEN ?"Rebuilt " + ALLTRIM(projects.exename) ELSE ?"Problem building " + ALLTRIM(projects.exename) ENDIF ENDSCAN ENDIF>I have approx 30 software products built on the same basic engine using VFP6. Each of these has a project however the projects are very similar. The only differences between them are the icons and the menus. I have removed the data from the projects. I want to be able to base all the 30 programs on one project and build all 30 executables by running a vfp program. This program will need to change the icon and the menu location for each project and name the executable a different name. Has anyone done this programmatically? The idea is that I will only have to maintain 1 project and any changes to that project will be propogated thru all other projects when the exes are rebuilt. I have toyed with changing name, key, homedir, etc in the pjx table but some items like menus appear to need adding thru the interface so their object code, etc are updated correctly in the pjx.