How to create silverlight application insatller - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sagar
Posts: 39
Joined: Tue Dec 13, 2011 2:53 pm

How to create silverlight application insatller

Hello,
I have created silver-light application, I want to create installer for that application by using advanced installer so that when i install that application on any machine that application should run for that machine envelopment.Please send me step how to create installer.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hello and welcome to Advanced Installer forums,

Unfortunately we don't have any specific user guide article for Silverlight applications.

However, I highly recommend you read our tutorials for a better understanding of how to use Advanced Installer to efficiently deploy your application.This will also help you better understand support team's suggestions now and in the future. The Simple and Professional tutorials are especially important.

Please keep in mind you can add Silverlight as a prerequisite from our predefined prerequisites list( "Add" combo on the top right ) in the Prerequisites page.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hello,

One of our colleagues from the development team with more Silverlight experience offered to help you with the steps you need to consider:
- first check if your Silverlight application is configured out of browser
- if so then add .XAP in the Files and Folders page
- follow this article to run the following command line during install:

Code: Select all

"C:\Program Files\Microsoft Silverlight\sllauncher.exe"  
/install:"YourApplication.xap"  
/origin:YourAppURL
/shortcut:desktop+startmenu  
/overwrite
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sagar
Posts: 39
Joined: Tue Dec 13, 2011 2:53 pm

Re: How to create silverlight application insatller

Hi Mihai,
Thank you for your replay.
Actually we want to create installer for silverlight web application. My application contain 4 project class library for database connectivity,silver-light application,wcf application & web application.We have defined database connection in web.conf file of wcf application .
<connectionStrings>
<add name="th5Entities"
connectionString="Data Source=192.168.8.138\SQLEXPRESS;Initial Catalog=Dev;User ID=sa;Password=aaa@123;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
At the time of installation user will provide the server on which we have to create the database Dev.So at run time we will change the database connection.,After installing the silverlight application we will run our project by using that database.
When I add only .XAP file in the Files and Folders page I am not able to change the database connection.I want to change the database connection at the time of installing the project.
I have created the demo installer by taking reference of Professional tutorials but I am not able to change the database connection at run time. I want to create the custom dialog to take the server name from user, following steps i have performed at the time of creating the installer
1>I have added wcf project & web project in the Files and Folders page
2>In IIS I have created web site by using web project
3>In web project I have added wcf project as web application.
Please help me to create the custom dialog which will display available server in dropdown & change the database connection depending upon selected server at the time of installing the project.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hello,

Unfortunately there is no predefined functionality in Advanced Installer to modify the contents of a .XAP or any other archive for that matter.
The only solution in this case would be to implement your own custom behavior( Custom Actions page ) that performs this change in the configuration file.

After some further analysts of your case, we thought of another approach you could try since the connection string can be passed as a parameter to your .XAP.
This approach would consist in trying to modify the .HTML file using our XML or Text Editor:
http://www.advancedinstaller.com/user-g ... -file.html
http://www.advancedinstaller.com/user-g ... files.html

Here's the MSDN reference to the parameter.
Please help me to create the custom dialog which will display available server in dropdown & change the database connection depending upon selected server at the time of installing the project.
Here's an article to get you started with this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sagar
Posts: 39
Joined: Tue Dec 13, 2011 2:53 pm

ODBC time out error when I use (local) as server name

hello Mihai,
I want to create new database form sql script when user insert correct information in sqlconnection dialog.In my project I have created predefined SQL connection to create new database in SQL server.After adding (local) as server name in sqlconnection dialog I am getting ODBC time out error .I have referred the following tutorial
http://www.advancedinstaller.com/user-g ... l-sql.html
Same error is coming at the time of testing the SQL connection.
Please tell me how to use SQL Script to create new database at the time of installation.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hello,

Can you please send us the .AIP ( project file ) to support at advancedinstaller dot com so we can investigate it?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sagar
Posts: 39
Joined: Tue Dec 13, 2011 2:53 pm

Re: How to create silverlight application insatller

Hi ,
Thank you for your replay,Please find attached .api file with this post.
In my machine I have installed SQL 2008R2 software, So by default two server is creating 1>511-0735\SQLEXPRESS
2>511-0735\SQLSERVER2008.When I enter server name as 511-0735\SQLEXPRESS2008 or 511-0735\SQLEXPRESS it will work fine but when I use (local) as server name then it will give me time out error.
I want to select server name from list of server which is present on network so I browse for SQL Servers on the network.I referred tutorial which is given in http://www.advancedinstaller.com/user-g ... rvers.html link.
But SqlServerBrowseListBox will display (local) for local server because of this when I select (local) option it will give me time out error.Can we display 511-0735\SQLEXPRESS2008 and 511-0735\SQLEXPRESS server name in SqlServerBrowseListBox instead of (local) so it will remove time out error.
Attachments
Demo.aip
.API file of demo project
(12.21 KiB) Downloaded 429 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hello,

Everything seems configured OK in your project.

The reason (local) doesn't work is because it is the default instance. If you named your instances when installing your SQL servers, then the names must be specified in the connection string.

I noticed you set the second method( ODBC Driver Manager ) to browse for servers. This option should set the listbox item text to the following format:

Code: Select all

ServerName\InstanceName;Clustered:No;Version:9.00.3042.00
The item text could be reduced to just the server name, if the remote does not provide any additional information.

In this case you should parse that information and set the connection string with the information you need.

Unfortunately, Advanced Installer offers only two browse methods:
NetServerEnum ( Windows Network Manager API )
SQLBrowseConnect ( ODBC Driver Manager )
You can try both and get more detailed information by searching the above bold text in MSDN.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sagar
Posts: 39
Joined: Tue Dec 13, 2011 2:53 pm

Re: How to create silverlight application insatller

Hello,
You are right at this moment list box is showing only server name.Please tell me how should I parse the information to get required information like instances name?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hello,

In ListBox controls, the output format should be as follows when using ODBC Driver Manager( SqlServerBrowseMethod = 2 ) :
Item text: ServerName\InstanceName;Clustered:No;Version:9.00.3042.00 ( This item text could be reduced to just the server name, if the machine does not provide any additional information )
Item value: ServerName (always)

If the listbox is showing only the server name at runtime, then this is the "Item text".

Does the browse output behave differently when using Windows Network Manager API( SqlServerBrowseMethod = 1 )?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sagar
Posts: 39
Joined: Tue Dec 13, 2011 2:53 pm

Re: How to create silverlight application insatller

Hello,
List box will show same output when I use Windows Network Manager.
Depending upon user input I want to update my connection string which is present in web.config file . Is any other way to get ServerName\InstanceName as a value so that I will update my web.config without hard-coding the InstanceName .
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hi,

First off, you can try your package on other machines and see if the behavior persists. It shouldn't.

If you are worried your users will get the same behavior you do, you can try to add a SetProperty event on the "Next" button before setting SqlConnectionString:
Name: [SqlServerBrowseListBox]
Argument: 511-0735\SQLEXPRESS2008
Condition: SqlServerBrowseListBox = "(local)"

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sagar
Posts: 39
Joined: Tue Dec 13, 2011 2:53 pm

Re: How to create silverlight application insatller

Hello,
Thank you for your replay.You are right, When I tested my installer on other machine, list box is showing ServerName\InstanceName;Clustered:No;Version:9.00.3042.00.
Please tell me how can I use selected listbox item text (ServerName\InstanceName)? i.e. set public property to selected listbox item text (ServerName\InstanceName)
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to create silverlight application insatller

Hello,

The item value will always be set to ServerName, but to get ServerName\InstanceName from the item text you must develop your own custom action.
For example you can have a .DLL which stores into another variable the first characters from item text string until the first ";" occurrence.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”