Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

CA doesnt work with Silent Install


2 replies to this topic

vincejairam

vincejairam
  • Members
  • 8 posts

Posted 09 February 2004 - 22:13

I posted this question on the installshield forum http://community.ins...threadid=129529 but was unable to get a resolution.

Let me restate the problem:

I have a custom action that needs to create a config file in the install directory. The CA is a vbscript that is a deferred action. When the install is run interactively everything works as expected no problems. When I run the setup in silent mode the script is not able to obtain the install path which screws up the whole CA. My script is below

dim szInstallDir, fileSysObject

' Get the install path.
szInstallDir = Session.Property("CustomActionData")

set fileSysObject = CreateObject("Scripting.FileSystemObject")
szInstallDir = szInstallDir & "config.ini"
...

This CA to setup the CustomActionData value is done right after LaunchConditions in the Installation\Execute sequence. This CA is following what the article http://support.insta...ticleid=q104413 described.

Any help would be appreciated.



hteichert

hteichert
  • Members
  • 158 posts

Posted 10 February 2004 - 11:24

You're setting your CustomActionData to early.
The directories (INSTALLDIR for example) are resolved during the CostFinalize action. You have to place your type 51 action to set the CustomActionData after CostFinalize in the InstallExecute sequence.

The reason why it works with but not without UI is really simple:
There's a CostFinalize in the UI sequence, thus INSTALLDIR is resolved and due to its global nature (all UPPERCASE) it's still available in the Execute sequence.

(edited due to a typo)

Edited by hteichert, 10 February 2004 - 11:25.

h.teichert-ott

vincejairam

vincejairam
  • Members
  • 8 posts

Posted 11 February 2004 - 16:16

thanks hteichert finally an answer that makes sense. I tried it and it work biggrin.gif I don't know why the installshield developers couldn't answer this. Thanks again appreciate it.

Edited by vincejairam, 11 February 2004 - 16:16.