Page 1 of 1

Bug in Control Service

Posted: Wed Nov 17, 2010 11:09 am
by prezmer
Hello,
I've found a bug in control service. My simple project file (Native) should install 1 NT service. It should be started, and if application is uninstalled, stopped and deleted.

MSI code contains:
Install Service C:\BUILDS\ctiRight_BUILD\ctiRight\bin\ctiRight.exe to $TARGETDIR$ as ctiRights
Control Service ctiRights: start on install [wait for completion]
Control Service ctiRights: stop and delete on uninstall [wait for completion]

What is funny, line with "stop and delete on uninstall" is performed during installation :!: At least, when I stepped through the code and checked "Computer Management|Services"

Re: Bug in Control Service

Posted: Wed Nov 24, 2010 4:57 pm
by mills
Are you getting an error?

On what OS are you testing?

Re: Bug in Control Service

Posted: Thu Nov 25, 2010 12:59 pm
by prezmer
mills wrote:Are you getting an error?

On what OS are you testing?
Tested on Windows 2003 R2 Std 32b.
I can send you project file if it helps.

Re: Bug in Control Service

Posted: Fri Nov 26, 2010 6:00 pm
by mills
What may be happening is the designer is generating code under the old MSI logic/construct.

When the native engine is in use, the commands are executed as they are seen. The control service commands had to be applied before apply install so MSI would know to run them on the uninstall.

Since IA will directly execute the command, it now needs to be moved from before Apply Install to before Apply Uninstall.

Code: Select all

if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here
  Control Service aaamyservicename: stop on install [wait for completion]
  Control Service Themes: stop and delete on uninstall [wait for completion]
  Apply Uninstall (get result into variable SUCCESS)
  Set Variable PROGRESS to 100
else

Re: Bug in Control Service

Posted: Mon Nov 29, 2010 1:03 am
by prezmer
So, what is your suggestion about how to solve this problem? Is it a bug or expected behavior? If expected, then it seems that using Hybrid Installation Technology requires significant changes in generated code.

Re: Bug in Control Service

Posted: Tue Nov 30, 2010 1:48 pm
by mills
It is being considered expected behavior by our developers, but I'm trying to convince them that this a bug (difference between expected and actual behaviors).

Consider that your installer can move in and out of ENGINE modes, so we can't necessarily tell what you want to use. If we generate code for the NATIVE ENGINE, then we will run into problems when you're using the MSI ENGINE.

As a work-around, you can use a basic setup template and you will not experience this problem, however you won't necessarily be leveraging the speed of the NATIVE ENGINE.

I personally believe there's a more elegant approach to this scenario. I have proposed a feature request to allow you to choose which ENGINE style you want to generate code from the designer.