-2

I'm using installshield to develop an installer for a product and I'm having issues with the ActionText (the current action description) updating for my custom action.

I've followed these steps here: http://helpnet.flexerasoftware.com/installshield17helplib/ActionTextSettings.htm which make perfect sense, and should work, but my custom action doesn't update the action text in the UI.

I'm thinking that because my custom action runs and waits for a long running process to end, maybe it's blocking whichever thread is responsible for updating the action text.

Now I write it, it doesn't seem to make sense, but I don't know what else might do it!

The main details of the Custom Action are:

Filename & Command line: wscript.exe "invisible.vbs" "longrunningbatch.bat"
Return Processing:       Synchronous
In-Script Execution:     Commit Execution in System Context

And invisible.vbs contains:

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, True

The above line should hide the shell window and the 'True' ensures the shell doesn't return until the batch file has finished running.

I've also added my custom action to the Action Text list as per the link and associated it with a string.

Should work right?

Anyone else experienced this at all?

Kev
  • 118,037
  • 53
  • 300
  • 385
Andy
  • 2,977
  • 2
  • 39
  • 71

2 Answers2

1

Firstly, you'll need to brush up on your Windows Installer, because if you've changed an action from commit to deferred and that's OK with you then you've done something unusual. Deferred actions are for actions that modify the system in some way related to the install. Commit actions are to finalise any work that the associated deferred action has done (e.g. deferred action modifies some system file. Commit action deletes the backup of the unmodified system file). Additionally, if you have a deferred action then you should also have a rollback action which undoes any action done by the deferred action in the event that the user cancels the install or it fails.

The following two links should help point you in the right direction:

http://blogs.flexerasoftware.com/installtalk/2011/10/i-take-it-all-back-using-windows-installer-msi-rollback-actions.html

http://www.installsite.org/pages/en/isnews/200108/index.htm

Secondly, if all the custom action does is to update the action text in the progress dialog, then you don't need it at all. Flexera doesn't document this, but you can set the action text for any custom action you build through the direct editor. To do this, add entries in the "ActionText" table, where the "Action" column is the name of your custom action and the "Description" column is the text you want to display.

jhr.lim
  • 46
  • 4
  • Thanks for your reply (much politer than some others who shall not be mentioned and have down-voted my question and answer twice) :). You're completely correct that it's a concern if I can move the action in question from commit to deferred, but in this case, really it should always have been in deferred execution. Also, your right about the roll-back action. I've already got this in place too! :) Generally speaking, I'm pretty clued up with IS, clearly not as much as some, and therefore completely welcome help and suggestions. – Andy Jun 18 '13 at 07:38
  • Also, the custom action isn't just to update the text, that'd be a bit odd, but thanks for the suggestion. Actually the custom action installs a printer driver and printer. – Andy Jun 18 '13 at 07:43
-2

Ok,

So I found this post: http://community.flexerasoftware.com/archive/index.php?t-82772.html, which basically says that since my custom action was set to commit execution, the install was effectively finished at the time it was running, and therefore there's no point in updating the progress text.

So the fix for my situation is to move my custom action to just before InstallFinalize and switch to 'deferred execution'.

Hope this might help someone.

Kev
  • 118,037
  • 53
  • 300
  • 385
Andy
  • 2,977
  • 2
  • 39
  • 71