Page 1 of 1
Service Dependency Error On Compilation
Posted: Mon Mar 25, 2013 7:13 pm
by vsaeternautocrib
I've tried to compile a service with a dependency with MSSQL$SQLEXPRESS service. When I add in MSSQL$SQLEXPRESS in the field labeled "Dependencies on Services and Load Order Groups" the compilation errors during the build with:
Error during build: Unable to compile MSI action install service
When I remove the dependency, there is no error and finishes building. I did try removing the $ character and the build finishes as well so it is my conclusion the $ is the problem. Is there maybe another way to enter the SQL Instance (SQLEXPRESS) as a dependency?
Re: Service Dependency Error On Compilation
Posted: Tue Mar 26, 2013 8:15 am
by FrancescoT
Dear User,
what InstallAware version are you using?
Honestly, I just tried to the same and my project compiles correctly.
Regards
Re: Service Dependency Error On Compilation
Posted: Tue Mar 26, 2013 9:57 am
by vsaeternautocrib
I am using the Installaware Studio version 15. I've attached the project files. Could be something I'm doing incorrectly. In the project, I have the ASPSync service dependency set to MSSQL$SQLEXPRESS. I get the error when compiling. When I remove it, no errors.
Re: Service Dependency Error On Compilation
Posted: Tue Mar 26, 2013 11:24 am
by FrancescoT
Dear User,
Ok, I'll verify it.
Regards
Re: Service Dependency Error On Compilation
Posted: Wed Mar 27, 2013 10:15 am
by FrancescoT
... ok, I found the same.
Please try with passing a variable with Service name Dependancies.
I used;
Set Variable MYDEP to MSSQL$SQLEXPRESS
... and worked fine.
NOTE.
The command documentation reports that variables are not allowed with "Dependancies" command parameter using Windows Installer.
I will log a note to our dev team, because this seems not true.
Regards
Re: Service Dependency Error On Compilation
Posted: Wed Mar 27, 2013 4:44 pm
by vsaeternautocrib
Thank you. I'm not exactly sure how to pass this variable to the service installing. Where exactly did you placed this line?
Set Variable MYDEP to MSSQL$SQLEXPRESS
Re: Service Dependency Error On Compilation
Posted: Thu Mar 28, 2013 8:18 am
by FrancescoT
Dear User,
in your main script code (MSI code view in IA IDE), declare a custom variable just before the "Install Service" command call.
Then use the variable value with "Dependancies" command parameter (the variable must be dereferenced when passed as parameter).
"The syntax for dereferencing a variable in InstallAware is enclosing the variable name between dollar signs. For instance, if the variable is called MYVAR, dereference the variable using $MYVAR$. You may freely combine multiple dereferenced variables in your string literals."
Finally your code should be as below;
Code: Select all
Set Variable MYDEP to MSSQL$SQLEXPRESS
Install Service ..\ProjectFiles\ASPSyncService.exe to $TARGETDIR$ as ASPSyncService
Regards