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

AFTERREBOOT, Is custom action required for this?


4 replies to this topic

mhz

mhz
  • Full Members
  • 11 posts

Posted 28 February 2007 - 08:59

Hi.

My product is Installshield 10.5 (AdminStudio). I have made many basic-MSI's, but no installscript. I write VB(6,.NET,script) and some C#.

I have several features, which have basically these conditions:

Feature1 (VersionNT=400 AND Not Installed).
Feature2 (VersionNT=400 AND AFTERREBOOT=1)
Feature3 (VersionNT>=500)
Feature4 (VersionNT>=500 OR (VersionNT=400 AND AFTERREBOOT=1))

As you can see, I tried to install features before and after reboot with feature conditions such as (VersionNT=400 AND AFTERREBOOT=1). The features after the reboot never install. What is more, during the initial run before the reboot, the InstallValidate shows that those components inside the "conditional" features as Installed: Absent, Request: Null, Action: Null

So I'm guessing that I'm making feature conditions that are invalid? Maybe the AFTERREBOOT is only ever recognized in the InstallExecute actions, but cannot be part of a feature condition?

In my InstallExecute sequence, with AFTERREBOOT<>1, etc. the reboot part works. If I need features that only install after the reboot, do I have to learn to write a custom action for that? Can someone point me to example CA for how to handle it? I have not written CA's before, but with an example I should be able to understand.

Some help would be so much appreciated.

unsure.gif
-------------------------------------------
The things that seem obvious to you, ARE NOT. If they were, people wouldn't be spending their time here.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 February 2007 - 09:08

You can use AFTERREBOOT to resume a setup after a ForceReboot action. But file copy, and evaluation of feature conditions, happens only once, as far as I know.

Why do you need to install some feature before reboot and other after reboot?

mhz

mhz
  • Full Members
  • 11 posts

Posted 28 February 2007 - 16:56

Thanks for asking, in case maybe I am going about this wrong. The reason is that on one of the OS versions, I need to install a pre-requisite software, (WMI Core 1.5) which will need to be used later in the installation.

I was told by the other developer (who handed off this project) that a reboot is necessary to get the WMI components working. Then...

Feature4 (VersionNT>=500 OR (VersionNT=400 AND AFTERREBOOT=1))

will execute a script that requires the WMI.

At my place of business, normally the actions such as a reboot are handled by an external job framework, such as SMS or Patchlink. But this particular installation is the first one for "unmanaged" machines, meaning that I have to get all the setup functions to run from one MSI (one download, one click for user).


-------------------------------------------
The things that seem obvious to you, ARE NOT. If they were, people wouldn't be spending their time here.

mhz

mhz
  • Full Members
  • 11 posts

Posted 01 March 2007 - 06:39

If CA is necessary, I would like to see an example of how one would install a feature via custom action. Thus far I have never needed custom actions. I'm not familiar with the API's or objects that are available.

Do I need to set the InstallLevels in a special way so that the standard actions don't decide to install the features, but rather the Custom Action does all of the work?

I can look up the details, once I have an idea to go on, but first I need an overview, or basic idea of how it could be done.


Thanks again for your help.

-------------------------------------------
The things that seem obvious to you, ARE NOT. If they were, people wouldn't be spending their time here.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 01 March 2007 - 17:42

Your options:
Install WMI and all the other files, then reboot, then run the script.
-or-
Use a setup.exe to install WMI as a prerequisite.
-or-
Install WMI using a custom action before reguslar file copy.