Installing Jade Services from Install Shield or similar

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Installing Jade Services from Install Shield or similar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by reinier >> Mon, 18 Aug 2003 3:24:20 GMT

We are currently creating an install CD for our product. We are looking at ways to create the services (jade rap -> jadserv, and App Server) silently with out user intervention i.e. with out using JadeRap. I have experimented with AdvApi32.dll and have some success with creating a service, but seem to get autoenrollment problems and are actually unable to start the services. I was wondering if you had any idea's, or indeed if jaderap took command line parameters?


Thanks

Reinier

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Installing Jade Services from Install Shield or similar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by Torrie >> Mon, 18 Aug 2003 8:30:50 GMT

Jaderap does take command line parameters.

At least it must have the system directory (Path=...) It can also take its ini file (ini=). If this is not specified then it uses the jade.ini file in the system directory.

You will also need to set the relevant settings in the ini file for the port numbers etc. These are detailed in chapter two in the Installation and Admin guide and discussed in chapter 7.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Installing Jade Services from Install Shield or similar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by reinier >> Mon, 18 Aug 2003 22:16:57 GMT

I have set the relevant settings in the ini file. But I need to get the service installed with out user intervention (the ini file has StartAsService=true), I don't want to have to get the client to open jaderap session and get them to click on the services and then click ok. I was hoping there was a service=true command line option but it appears there is not.

I have been playing around with the AdvApi32.dll this actuall creates the service and I can make it resemble what jadrap places in the registry, but still no joy.

Thanks

Reinier

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Installing Jade Services from Install Shield or similar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by Torrie Moore >> Wed, 20 Aug 2003 20:08:02 GMT

Reinier

I've had a look and managed to get it working.

The jade service command line for Jadrap is something like
"C:\Program Files\Jade52\bin\jadserv.exe" path="C:\Program Files\Jade52\system" ini="C:\Program Files\Jade52\system\jade.ini" service="JadeServer" run
Note the quotes are needed so windows can resolve the path names.

You also need to make the jade service dependent on the Browser service as jade needs this loaded before it will work. The service="<name>" I'm guessing needs to match the service name you used when registering the service.

The command line for Jadeapp is similar
"C:\Program Files\Jade52\bin\jadappb.exe" "C:\Program Files\Jade52\bin\jadappb.exe" path="D:\Jade Systems\Local System\System" server=multiuser appServerPort=6011

You can make the Jade app service dependent on the Jadrap service so it will be started once the server has started (if not it must be dependent on the Browser service like the Jade rap service. (This is not done by the Jade App utility)

Torrie

=======================

Some sample code in C

VOID CreateSampleService( )
{
SC_HANDLE schSCManager;
SC_HANDLE schService;

LPCTSTR lpszJadAppCommandLine = "\"C:\\Program Files\\Jade52\\bin\\jadappb.exe\" \"C:\\Program Files\\Jade52\\bin\\jadappb.exe\" path=\"C:\\Program Files\\Jade52\\bin\\System\" server=multiuser appServerPort=6011";
LPCTSTR lpszJadAppServiceName = "JadeAppServer" ;
LPCTSTR lpszJadAppDisplayName = "Jade Application Server";
LPCTSTR lpszJadAppDependencies = "Browser\0JadeServer\0" ;

LPCTSTR lpszJadRapCommandLine = "\"C:\\Program Files\\Jade52\\bin\\jadserv.exe\" path=\"C:\\Program Files\\Jade52\\bin\\system\" ini=\"C:\\Program Files\\Jade52\\bin\\system\\jade.ini\" service=\"JadeServer\" run";
LPCTSTR lpszJadRapServiceName = "JadeServer" ;
LPCTSTR lpszJadRapDisplayName = "Jade Server";
LPCTSTR lpszJadRapDependencies = "Browser\0" ;

schSCManager = OpenSCManager( NULL,SERVICES_ACTIVE_DATABASE ,SC_MANAGER_ALL_ACCESS );

// Create the Jade Rap Service and start it
schService = CreateService(
schSCManager, // SCManager database
lpszJadRapServiceName, // name of service
lpszJadRapDisplayName, // service name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS, // service type
SERVICE_AUTO_START, // start type
SERVICE_ERROR_NORMAL, // error control type
lpszJadRapCommandLine, // service's binary
NULL, // no load ordering group
NULL, // no tag identifier
lpszJadRapDependencies, // dependencies
NULL, // LocalSystem account
NULL); // no password

StartService( schService, 0, NULL );
CloseServiceHandle( schService );

// Create the Jade Application Server Service and start it
schService = CreateService(
schSCManager, // SCManager database
lpszJadAppServiceName, // name of service
lpszJadAppDisplayName, // service name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS, // service type
SERVICE_AUTO_START, // start type
SERVICE_ERROR_NORMAL, // error control type
lpszJadAppCommandLine, // service's binary
NULL, // no load ordering group
NULL, // no tag identifier
lpszJadAppDependencies, // dependencies
NULL, // LocalSystem account
NULL); // no password

StartService( schService, 0, NULL );
CloseServiceHandle( schService );

// Close the handle opened for the service manager
CloseServiceHandle( schSCManager );
}

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Installing Jade Services from Install Shield or similar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by reinier >> Fri, 22 Aug 2003 3:42:22 GMT

Torrie.

Thanks for that. That pretty much has what I have, except I have it within installshield. Calling the same fuctions and using the same API.

I guess I will need to keep trying.

Thanks

Reinier

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Installing Jade Services from Install Shield or similar

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:24 pm

by reinier >> Sun, 24 Aug 2003 23:52:39 GMT

Torrie.

Thanks for that. That pretty much has what I have, except I have it within installshield. Calling the same fuctions and using the same API.

I guess I will need to keep trying.

Thanks

Reinier


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 14 guests