With IA you can accomplish this by defining two different features, and filter installation files by features. Let me try to give you the steps to do it, Note: I am using the Windows XP and Vista you mentioned to explain it.
In the design tab:
1.- Create two different features (Windows XP and Windows Vista) in "Setup Architecture"-->"Features"
2.- Select the files for each feature by checking the "Filter Files by Features" checkbox in "Setup Architecture"-->"Files"
In the MSICode tab:
3.- Find the following code region: "Perform First Time or Maintenance Installation [...]"
4.-In that code region, you will find kind something like the following code:
Code: Select all
[DEFINE WEB MEDIA Windows Vista]
1 Get Component Windows Vista Selection State into Variable SELECTED
2 if Variable SELECTED Equals TRUE
3 Install Files C:\\Documents and Settings\\Alejandro Ronquillo\\My Documents\\My Pictures\\dialog.JPG to $TARGETDIR$
4 end
[DEFINE WEB MEDIA Windows XP]
5 Get Component Windows XP Selection State into Variable SELECTED
6 if Variable SELECTED Equals TRUE
7 Install Files C:\\Documents and Settings\\Alejandro Ronquillo\\My Documents\\My Pictures\\error.JPG to $TARGETDIR$
8 end
5.- Replace line 1 for the following:
6.- Replace line 2 for the following:
7.- Remove line 5
8.- Replace Line 6 for the following
In the design tab:
9.- Uncheck the checkboxes for dialogs "setuptype" and "componentstree" in "User Interface"-->"Dialogs"
And now you have accomplished an installation based on OS.
This is just an example, you can play with it according to your needs. I hope this was helpful.