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
- :
- Checking Service Endpoint
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
‎Feb 20, 2015
01:56 AM
Checking Service Endpoint
Hi Guys,
Just looking for some advice regarding an issue that I am trying to get around. The project I am working on is using InstallShield 2013 Premier to deploy the application. For the last few weeks I have been messing around with my own basic application and so far I am happy with the results.
Currently I have my package installing the client, a Windows Service and a run my database script. Now after the installtion has taken place I would like to see if I can connect to my Service endpoint, this would double check that the service is up and running with a connection.
If anyone has any suggestions on how I could do this then thats great. I have looked into creating a Powershell Script or developing a InstallShield script but they don't have this functionailty (from what I can tell anyway). The project is writtern in C#.
Thanks,
Chris
Just looking for some advice regarding an issue that I am trying to get around. The project I am working on is using InstallShield 2013 Premier to deploy the application. For the last few weeks I have been messing around with my own basic application and so far I am happy with the results.
Currently I have my package installing the client, a Windows Service and a run my database script. Now after the installtion has taken place I would like to see if I can connect to my Service endpoint, this would double check that the service is up and running with a connection.
If anyone has any suggestions on how I could do this then thats great. I have looked into creating a Powershell Script or developing a InstallShield script but they don't have this functionailty (from what I can tell anyway). The project is writtern in C#.
Thanks,
Chris
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 20, 2015
07:08 AM
Hi Chris,
Look up in InstallShield 'ServiceGetServiceState'. Below is an example.
Note that this is written for use with a suite project, just comment out the logging there for SprintfMsiLog and log errors this way.
I am not sure if you need anything other than determining if the service is running or not. There is also the ServiceExistsService.
Look up in InstallShield 'ServiceGetServiceState'. Below is an example.
//Stop Database
szServiceName = 'MSSQL$AMAZINGCHARTS';
ISDeterminePlatform();
nvResult = ServiceInitParams();
try
ServiceGetServiceState(szServiceName, nvServiceState);
if (nvServiceState != SERVICE_STOPPED) then
nvResult = ServiceStopService(szServiceName);
if (nvResult < ISERR_SUCCESS) then
GetExtendedErrInfo(svScriptFile, nvLineNumer, nvError);
SuiteLogInfo("ACSetupUtility WARNING: Failed to stop %s Service. Setup will continue but may fail.",szServiceName);
SuiteLogInfo("ACSetupUtility ERROR: ServiceStopService Error %d", nvError);
endif;
endif;
catch
SuiteLogInfo("ACSetupUtility WARNING: Failed to stop %s Service. Setup will continue but may fail.",szServiceName);
endcatch;
Note that this is written for use with a suite project, just comment out the logging there for SprintfMsiLog and log errors this way.
I am not sure if you need anything other than determining if the service is running or not. There is also the ServiceExistsService.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 20, 2015
08:00 AM
DLee65 wrote:
Hi Chris,
Look up in InstallShield 'ServiceGetServiceState'. Below is an example.
//Stop Database
szServiceName = 'MSSQL$AMAZINGCHARTS';
ISDeterminePlatform();
nvResult = ServiceInitParams();
try
ServiceGetServiceState(szServiceName, nvServiceState);
if (nvServiceState != SERVICE_STOPPED) then
nvResult = ServiceStopService(szServiceName);
if (nvResult < ISERR_SUCCESS) then
GetExtendedErrInfo(svScriptFile, nvLineNumer, nvError);
SuiteLogInfo("ACSetupUtility WARNING: Failed to stop %s Service. Setup will continue but may fail.",szServiceName);
SuiteLogInfo("ACSetupUtility ERROR: ServiceStopService Error %d", nvError);
endif;
endif;
catch
SuiteLogInfo("ACSetupUtility WARNING: Failed to stop %s Service. Setup will continue but may fail.",szServiceName);
endcatch;
Note that this is written for use with a suite project, just comment out the logging there for SprintfMsiLog and log errors this way.
I am not sure if you need anything other than determining if the service is running or not. There is also the ServiceExistsService.
Thanks for your reply.
This has been useful and thanks for the example. If my service doesn't start up correctly I have placed logic to manage it however my requirement is more focused on the actual connection. I would like to create a channel to the Service Endpoint and make sure its there. This will proof that the service is just not up and running, but also ready to be used correctly.
I was looking on the same lines as a custom action. Perhabs creating a small C# Application that would create this 'channel' to the Service. I don't know how to call a C# Custom Action and I cannot work out away to return an error message back to the InstallShield wizard. But I don't know if I am on the right lines, there could be a easier way.
Thanks,
Chris