This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- error2731:Selection manager not initialized
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 11, 2008
12:40 AM
error2731:Selection manager not initialized
Hi,all.
I want to install a winservice(WService.exe)with command arguments
winservice.exe -Install,the winservice.exe is installed along the package
i create the custom action with custom action wizard ,
the put the custom action to the sequence of after Costinitialize,
when i build and run it,i will have the occur message:error2731:Selection manager not initialized,so what's the problem?
can anyone do me a help?
thanks
Nicholas.
I want to install a winservice(WService.exe)with command arguments
winservice.exe -Install,the winservice.exe is installed along the package
i create the custom action with custom action wizard ,
the put the custom action to the sequence of after Costinitialize,
when i build and run it,i will have the occur message:error2731:Selection manager not initialized,so what's the problem?
can anyone do me a help?
thanks
Nicholas.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 11, 2008
08:38 AM
That error generally means that a custom action has referred to a Directory-table identifier before CostFinalize has run. Performing validation on the built MSI database can often catch this.
In any case, could you use the built-in MSI functionality for installing a service instead of a custom action?
In any case, could you use the built-in MSI functionality for installing a service instead of a custom action?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 11, 2008
08:42 AM
Nicholas_jiang wrote:
Hi,all.
I want to install a winservice(WService.exe)with command arguments
winservice.exe -Install,the winservice.exe is installed along the package
i create the custom action with custom action wizard ,
the put the custom action to the sequence of after Costinitialize,
when i build and run it,i will have the occur message:error2731:Selection manager not initialized,so what's the problem?
can anyone do me a help?
thanks
Nicholas.
Have a look at the help of Installshield 2008:
The selection manager is responsible for determining component and feature states. It is initialized during the costing actions ( CostInitialize action, FileCost action, and CostFinalize action.) A standard action or custom action made a call to a function requiring the selection manager before the initialization of the selection manager. This action should be sequenced after the costing actions.
well this seems to be a sequence problem.. your "WService.exe" has of course to know which paths on the target (Windows System Folder or others) are available (and how much space on the diskdrive is available) before it can sucessfully install the service
This functionality is only given, if the session manager has properly finalized all neccessary function for this case..
In general I woud suggest you (if you install the product in silent mode) to put the custom action after "InstallFinalize" the you will have the guarantee that the whole package is installed on the target and all is cleaned up sucessfully otherwise the Windows Installer can't return a correct state and the install fails
but as RobertDickau remarked the Install Service Feature (which is available uder the "Components View --> Advanced") woud be the better solution cause there you can fine tune the behavior of your new service... and this handy feature gives you better control over the service
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)