cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Ron_Schaeffer
Level 6

Set a Directory entry from Automation?

I'm trying to figure out if it is possible, through the Automation interface, to set a Directory entry/value. We have some side-by-side installers which install to a path which incorporates the ProductVersion value; INSTALLDIR is defined to the parent folder so that side-by-side versions can NOT overwrite one another. For a better understanding, the resulting disk folder is intended to look like this:

C:\Program Files\\\
----<[PRODUCTVERSION]>
--------fileA.exe
--------fileB.dll

Our installer Files & Folders view looks like this:

C:\Program Files\\\ {aka INSTALLDIR}
----VERSIONDIR
--------fileA.exe
--------fileB.dll

At runtime, we employ a custom action which sets VERSIONDIR to "[INSTALLDIR][PRODUCTVERSION]\", which does work.

However, I would much rather modify the Directory value of VERSIONDIR prior to the build, via Automation. In other words, the raw directory table entry in the ISM file currently looks like this:

[FONT="Courier New"]VERSIONDIRINSTALLDIRVersio~1|VersionDir0[/FONT]

What I would like to be able to do is effectively a "Set VERSIONDIR=[PRODUCTVERSION]", so that directory table row now looks like this:

[FONT="Courier New"]VERSIONDIRINSTALLDIR5.9.25450[/FONT]

Is there any way to do this, or not?

Thanks
Labels (1)
0 Kudos
(2) Replies
Lurean
Level 8

what you are describing should work provided that INSTALLDIR has been defined at the point you try to assign it.


I have done something similiar where I read in a registry value and drop a directory into a given location based on that registry value that is assigned to a property that corresponds to a folder location.


what behavior are you seeing when you try to do this?
0 Kudos
Ron_Schaeffer
Level 6

The Automation interface already has a mechanism for revising INSTALLDIR. However, I am not trying to revise INSTALLDIR, but one of the other entries in the Directory table - in my example the one called VERSIONDIR. So far I have been unable to find a way to revise any user defined entry in the Directory table, hence this conversation thread.

To re-iterate from my original post:

I would much rather modify the Directory value of VERSIONDIR prior to the build, via Automation.

If there is absolutely no way to do this, I'll have to stick with the run-time Custom Action solution I am using.

Thanks for considering this.
0 Kudos