cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rbjs2010
Level 2

InstallScript MSI project issues - Feature Events and Debugging script

I have been trying to get a InstallScript MSI project working but have run into following issues:

[LIST=1]
  • Specified a ("Feature Event") script for a specific feature "OnInstalled" and "OnUninstalled". The script does not run at all. Although feature gets installed.

    Any clue why script does not get executed.

  • When trying to "Debug" same project (Install script MSI), After initialization screen (preparing install etc), I get a popup "1629: Invalid command line". I have not specified or configured any command line parameters.

    How to fix this error?

  • After a specifying a "Feature Events" for a feature, does not allow me to unspecify the script. In "Features" view, if I select a "Feature Event" foo() and change my mind not to have any specific script I cannot get it back to "None Selected". Although in drop-down (for "Feature Events") there is "None Selected" it does not stick. Once I go to some other feature and come back it is still shows "fooBar()". Only way to clear "Feature Events" is to delete feature and add it back new, lot of work.

    Is this a bug in product?




    Thanks for any pointers
  • Labels (1)
    0 Kudos
    (7) Replies
    mfrieman
    Level 3

    Did anyone resolve this issue?

    I'm having the same issue
    0 Kudos
    joshstechnij
    Level 10 Flexeran
    Level 10 Flexeran

    - If you place message box calls in the Feature_Installed and Feature_Uninstalled events, do these message boxes display during install and uninstall?
    - How are you launching the project to debug it?
    - This is a known issue previously submitted under work order IOA-000053233. You can work around this behavior by removing the feature event from the Installing, Installed, Uninstalling, or Uninstall columns for the feature in the ISFeatureExtended table from the Direct Editor.
    0 Kudos
    pmatlock
    Level 6

    I am experiencing a similiar scenario within my InstallScriptMSI project...I have a custom code within the DefaultFeature_UnInstalling, but it doesn't seem to be executing. I have MessageBoxes that are not being displayed.

    Any suggestions?

    Also, how can we debug an un-install?
    0 Kudos
    joshstechnij
    Level 10 Flexeran
    Level 10 Flexeran

    The feature events will not be called if the feature was never installed. If the feature is being installed, the uninstall events will not run if the product is being removed as the result of a major upgrade.

    You should be able to debug an uninstall by launching the uninstall string for your product (available in the Uninstall\InstallShield_{ProductCode} key in the registry) and adding /d.
    0 Kudos
    pmatlock
    Level 6

    Josh,
    one more question. If I use the MSISetProperty function on my install script code...shouldn't I be able to access that property with MSIGetProperty in my uninstall code (ie. DefaultFeature_Uninstalling)?

    When I try and access the property in the uninstall code, it is not the updated value that I set it to. It is the default value that I have in the PropertyManager.
    0 Kudos
    joshstechnij
    Level 10 Flexeran
    Level 10 Flexeran

    Windows Installer won't persist property values across installation sessions. To be able to maintain a value from first-time install, it would need to be stored somewhere (possibly in the registry, or for InstallScript MSI projects, in the InstallScript log with a text-sub or LogWriteCustomString/LogReadCustomString) and then read back during maintenance scenarios.
    0 Kudos
    pmatlock
    Level 6

    Josh,
    Great info. Thanks for clarifying this for me!
    0 Kudos