osherk
Posts: 41
Joined: Mon Apr 20, 2015 11:55 am

[ComputerName] is not resolved

Hi,

I want to put a default value to the sql server ip, which is actually the computer name.

I set a new property - [Server_Prop] and in the value of the default value I set: [ComputerName]
In the SqlDlg I set the default value to [Server_Prop]. I use this value for 2 things - connecting to a sql instance and setting the web.config xml file with the connectionstring due to this value.

As I understand, [ComputerName] retrieves the ip of the computer automatically by AdvancedInstaller.
After I run the exe, nothing happens - I can't connect to the DB because the server is not resolved and in the web.config I get: Data Source=[ComputerName] which means the ip address is not resolved.

I also checked setting value of [ComputerName] directly in the web.config and in the SqlDlg but it didn't help.
what can be the problem?

Thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: [ComputerName] is not resolved

Hello,

This may happen if you have added the [ComputerName] reference in the "Value" field of your "Server_Prop" property from "Install Parameters" page. Please note that the "Value" field is not of formatted type so the [ComputerName] reference won't be resolved at install time. Instead it will be used like it is. To achieve what you want you should add, in "Custom Actions" page, a "Set installer property" custom action with sequence, scheduled after "Searches" action group which will set your "Server_Prop" property to the desired value like this:
  • Property:Server_Prop
    Value: [ComputerName]
Let us know if this helped, otherwise please send us the .aip (project file) to support at advancedinstaller dot com so we can check its settings.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
osherk
Posts: 41
Joined: Mon Apr 20, 2015 11:55 am

Re: [ComputerName] is not resolved

yes, it really helped,
thanks Daniel
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: [ComputerName] is not resolved

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”