The script side of it is not a problem. The problem now is I don't understand
how to set a property in the installer with the result of the script.
What I've done: created a property called 'targetDrive' which I need to pass to a custom action (it could be C:, D:, E:, etc). Then in Custom Actions, the InstallInitialize section, I added a new 'script inline'. In it I specified the source type to be vbs and the script text to be:
Code: Select all
targetDrive = Left("[TARGETDIR]", 2)
However this does not work, and the AI help says the text field is "a plain text field, so you can't add references to files, folders or properties".
So how do I do it? Do I have the wrong type of custom action? I don't mind whether the script is vbs, js or I run an exe, but I cannot see how to set my 'targetDrive' parameter??
Thanks