cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Richard_Kao
Level 3

Win32Service

I am getting a strange problem trying to get the Win32Service. Accessing other services is working fine.

Using the following code throws a ServiceException...

Win32Service service = (Win32Service) arg.getService(Win32Service.NAME);

In a custom wizard action I have the following...

support.putRequiredService(FileService.NAME);
support.putRequiredService(SecurityService.NAME);
support.putRequiredService(ProductService.NAME);
support.putRequiredService(Win32Service.NAME);

The exception I am getting is the following...

(Jul 25, 2006 4:28:17 PM), com.installshield.portal_search.event.dialog.swing.PanelPortalSearchUserInfo, err, ServiceException: (error code = 301; message = "Could not load service: win32Service"; severity = 0)
ServiceException: (error code = 301; message = "Could not load service: win32Service"; severity = 0)
at com.installshield.wizard.service.LocalWizardServices.getService(Unknown Source)
at com.installshield.event.ISContext.getService(Unknown Source)
at com.installshield.portal_search.event.dialog.swing.PanelPortalSearchUserInfo.isValidOSUser(PanelPortalSearchUserInfo.java:104)
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

That's odd, using putRequiredService(Win32Service.NAME) in your custom bean's build method should do it. As a sanity check, is

import com.installshield.wizard.platform.win32.win32service.*;

in your code, and

%ISMPDIR%\distributables\platform\ext\windowsppk.jar

on the build path?
0 Kudos
Richard_Kao
Level 3

I don't have the * reference. I have the following:

import com.installshield.database.ISDatabaseException;
import com.installshield.event.ui.ISDialogQueryContext;
import com.installshield.ui.controls.ISPasswordControl;
import com.installshield.ui.controls.ISTextField;
import com.installshield.util.Log;
import com.installshield.util.LogUtils;
import com.installshield.util.UserInputRequest;
import com.installshield.wizard.platform.win32.Win32Service;
import com.installshield.wizard.platform.win32.win32service.NTServiceConfig;
import com.installshield.wizard.service.ServiceException;
import com.installshield.wizard.service.WizardServicesUI;
import com.installshield.wizard.service.security.GenericSecurityService;
import com.installshield.wizard.service.security.GroupSpecification;
import com.installshield.wizard.service.security.UserSpecification;

The compiler classpath is the following:

$A(IS_HOME)/distributables/engine/engine.jar;$A(IS_HOME)/distributables/bootstrap;$A(IS_HOME)/lib/builder.jar;$A(BUILD_RESOURCES)\lib\Safe_Jul11.jar;$A(BUILD_RESOURCES)\lib\concurrent.jar;$A(BUILD_RESOURCES)\JDBC.jar;$A(IS_HOME)\distributables\platform\ext\windowsppk.jar
0 Kudos
Richard_Kao
Level 3

I figured out a hack which will make the java code work. I added a dummy "Windows Service Create Action" Wizard Action and set Active to false and now the getService(...) call works.

I think it is a bug with the putService when loading the Win32Service. :confused:
0 Kudos
Richard_Kao
Level 3

I finally figured out what was going wrong. I had updated the classes directory in ISMP with my custom bean but I didn't restart ISMP. After restarting ISMP it is working now. 😮
0 Kudos