PDA

View Full Version : Changing the Project file programattically



Roger Rabbit
10-01-2003, 09:42 AM
I am looking into how hard it will be for us to move to DevStudio. I would like a copy of a sample DevStudio project file (script based).

Basically, I need to see whether it is reasonable to process the project file and make changes to it programmatically. Also, in 6.3, adding a new string that did not exist before meant changing two files, not one. I would like to know whether there are any gotchas like that in the new system.

The version of the software is included in the installer name, and of course in the directory name where the installer is created. I generate the default install directory, several registry entries, and several display strings from the directory name, and insert them into the string table. I also generate a time stamp at build time and display that in the first screens shown on install or maintenance. As far as I can tell, I could not programmatically generate a build time stamp and display it as a string in the InstallShield system: I have to generate it outside the system.

With this method, I can generate a new version of an installer (changing the version number) in less than 5 minutes of my time, and let the batch file do the build.

I need to be able to keep this capability in the new version, if I am going to upgrade soon.

RobertDickau
10-01-2003, 09:50 AM
With DevStudio, your project file (now an ISM file) will by default be saved in XML format, which is text-based; optionally, you can instead save the project in a binary format.

In either case, DevStudio has an Automation interface, with which you can change many project settings. For illustrations of the general idea, please see the InstallShield newsletter tip archive for InstallShield Developer: http://www.installshield.com/news/newsletter/details.asp?source=isd. (Even though it's a different product, the idea is the same.)

Roger Rabbit
10-02-2003, 10:25 AM
Thanks, Robert.

I didn't know about the API on the newer products. It should solve my problem.