472,784 Members | 848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,784 software developers and data experts.

Getting Empty String

Hi

I am working on a web project.

I have a InstallerClass in my project.

While making setup ( using web setup template) for this web application, I
have added a userinterface with 4 textboxs, and added assembly to
CustomActions-->Install

In the installer class I have the following code


Public Overrides Sub Install(ByVal stateSaver As
System.Collections.IDictionary)

MyBase.Install(stateSaver)

Dim SName, Uname, PWD, DName As String

SName = Trim(Me.Context.Parameters.Item("ServerName"))
Uname = Trim(Me.Context.Parameters.Item("UserName"))
PWD = Trim(Me.Context.Parameters.Item("Password"))
DName = Trim(Me.Context.Parameters.Item("DatabaseName"))

If Trim(SName) = "" Then
Throw New InstallException("No arguments specified for
ServerName")
End If
If Trim(Uname) = "" Then
Throw New InstallException("No arguments specified for
UserName")
End If
If Trim(DName) = "" Then
Throw New InstallException("No arguments specified for
DatabaseName")
End If

Dim strConnStr As String = "server=" & SName & ";uid=" & Uname &
";pwd=" & PWD & ";database=" & DName & ";"

' rest of the code will copy this strConnStr to web.config

End Sub
In the above code I am getting emptystrings in SName,UName,PWD,DName etc....

It is sure that This code getting invoked while installing the
webapplication.

But I am getting empty string for
Me.Context.Parameters.Item("ServerName")

So Please help me in this regard.

Thanx in advance
Yoshitha
Jul 25 '05 #1
5 2169
Jan
In the Custom Actions Arguments fill in
/SName=[ServerName] /UName=[UserName] etc...

the first name will be the name that appears in the Dictionary Passed
to your installer
the second name will be the name you gave the Textbox in the installer
Dialogs section

Jan

Jul 25 '05 #2


Hi

Jan Thanks for your help..Its working..

Also for the same web application, I need to run an exe while installation
process is going on...
How can I do this?

please help me in this regard.

"Jan" <ja***********@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
In the Custom Actions Arguments fill in
/SName=[ServerName] /UName=[UserName] etc...

the first name will be the name that appears in the Dictionary Passed
to your installer
the second name will be the name you gave the Textbox in the installer
Dialogs section

Jan

Jul 26 '05 #3
Jan
Add another custom action for the same target and set 'InstallerClass'
to false and it will execute the target if it's an exe. If it's a dll
you need to write a host.
Jan

Jul 26 '05 #4
Hi

Jan Thanks ... it is working
But after geting invoked EXE, when I click "Close" button the following of
that EXE the following message is coming
"There is a problem with this Windows Installer Package. A program run as
part of the setup did not finish as expected. Contact your support personnel
or package vendor."
What could be the reason for this? I just creatd one more custom action for
the EXE and put 'false' for the InstallerClass section.
Is anything more to do?

Also for an application I am getting the error like as follows

The Installer is having a user interface with 4 textboxes.
Let 'XXX' is the value of the 4th textbox.
While installer runs, first interface will come and next a screen which
allows to specify VirtualDirectory will come. When I click 'Next' in that
screen, it is halting for 4 to 5 seconds and giving the following message
"The specified path 'XXX' is unavailable"
Thanks for your time and concern.
regards
Yoshitha




"Jan" <ja***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Add another custom action for the same target and set 'InstallerClass'
to false and it will execute the target if it's an exe. If it's a dll
you need to write a host.
Jan

Jul 27 '05 #5
Jan
you have to make sure that the main funtion returns success which is 0.

Jul 27 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Timo J | last post by:
Hi - Im sitting and trying to understand this OOP - and need to create a class wich can do the following.. ShowBlocks() - Displays the data wich is inside it - If empty creates a form wich sends...
5
by: mary | last post by:
When I read an HTML file starting with <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> and then I write it into another file, say OUTPUT.txt, I get an inverted question...
2
by: Nuno Magalhaes | last post by:
In a sample code I do something like this: //Populate IP List IPHost=Dns.GetHostByName(Dns.GetHostName()); DefaultIPCombo.Items.Clear(); DefaultIPCombo.Items.Add(IPHost.AddressList.ToString());...
5
by: Yoshitha | last post by:
Hi I am working on a web project. I have a InstallerClass in my project. While making setup ( using web setup template) for this web application, I have added a userinterface with 4...
32
by: paul | last post by:
HI! I keep on getting this error and I have tried different things but I am not sure how to send the expiring date. The error that I am getting in Firefox 1.5 is "Error: expires.toGMTString is...
5
by: mike | last post by:
Hi, I have been playing with VB.NET/C# for getting some general properties of a fileinfo object. However, FileInfo object does not seem to expose some of the basic properties like TYPE that used...
26
by: anonieko | last post by:
In the past I always used "" everywhere for empty string in my code without a problem. Now, do you think I should use String.Empty instead of "" (at all times) ? Let me know your thoughts.
2
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
185
by: jacob navia | last post by:
Hi We are rewriting the libc for the 64 bit version of lcc-win and we have added a new field in the FILE structure: char *FileName; fopen() will save the file name and an accessor function will...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.