Community Forums
Results 1 to 1 of 1

Thread: Custom Actions to configure features in silent mode

  1. #1
    Join Date
    Jan 2017
    Location
    South Wales, UK
    Posts
    1

    Question Custom Actions to configure features in silent mode

    I am trying to create an installer where the end-user has the ability to configure features when doing a silent install. So far I have created this VBScript:

    Code:
    MsgBox "Started"
    If Session.Property("TNS") = "0" then
    	MsgBox "Disabling TNS"
    	Session.FeatureRequestState("NewFeature2") = 2
    End If
    If Session.Property("CRYSTAL") = "0" then
    	Session.FeatureRequestState("NewFeature4") = 2
    End If
    If Session.Property("ORACLE") = "0" then
    	Session.FeatureRequestState("NewFeature3") = 2
    	Session.FeatureRequestState("NewFeature2") = 2
    End If
    MsgBox "Finished"
    The MsgBox calls are only there for debugging, obviously.

    I am launching it in the "After Setup Type Dialog" custom action, which is great for people doing attended installations, but does not fire during quiet or passive installations.

    I have tried launching it in the "Before System Search (silent mode only)" custom action, but then the script fires and causes an error, not sure what error as it causes the entire thing to terminate, but it's caused by Session.FeatureRequestState since I get the "Disabling TNS" msgbox, but not the "Finished" msgbox, and then the installer bombs out.

    I have tried launching it from "Before File Transfer" (with an added check on UILEVEL) but this is apparently too late as it gets ignored.

    I have tried launching it from "After Ready to Install dialog" (with UILEVEL check) but this doesn't fire on silent installs.

    Unless I'm missing something, there doesn't seem to be any way to fire a custom action with full access to the session.

    I've also tried this variant, fired from "Before System Search (silent mode only)". This one executes without errors, but the installer bombs out immediately afterwards:

    Code:
    Dim Features
    Features = "NewFeature1"
    If Session.Property("TNS") <> "0" and Session.Property("ORACLE") <> 0 then
    	Features = Features + "NewFeature2"
    End If
    If Session.Property("CRYSTAL") <> "0" then
    	MsgBox "Enabling Crystal Reports"
    	Features = Features + "NewFeature4"
    End If
    If Session.Property("ORACLE") <> "0" then
    	Features = Features + "NewFeature3"
    End If
    Session.Property("ADDLOCAL") = Features
    MsgBox "Finished"
    How can I acheive this?
    Last edited by LumKitty; 01-16-2017 at 05:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •