473,769 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Collecti ons.IDictionary )

MyBase.Install( stateSaver)

Dim SName, Uname, PWD, DName As String

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

If Trim(SName) = "" Then
Throw New InstallExceptio n("No arguments specified for
ServerName")
End If
If Trim(Uname) = "" Then
Throw New InstallExceptio n("No arguments specified for
UserName")
End If
If Trim(DName) = "" Then
Throw New InstallExceptio n("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.Para meters.Item("Se rverName")

So Please help me in this regard.

Thanx in advance
Yoshitha
Jul 25 '05 #1
5 2253
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.goo glegroups.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 VirtualDirector y 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.goo glegroups.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
2337
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 the info back to the Object, wich show the stuff.. AddBlock( $type ) - Creates an empty blok - wich is addet to a blocks area object...( Or somethin like it ) Store() - safes the info into a file, and updates mySQL... I have figured out most...
5
6363
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 mark, "¿", at the beginning of the OUTPUT.txt file. Why is that? Thanks! mary
2
7547
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()); DefaultIPCombo.SelectedIndex=0; How can I get all the IP adapters since this does only give me the IP address of the default adapter. I have a wireless connection also and
5
301
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 textboxs, and added assembly to CustomActions-->Install
32
5023
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 not a function" ---------------------------------------------------- I have this in a .js file and in the head section.
5
3803
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 to be available in "FileSystemObject" of ScriptingLibrary. For example the "TYPE" property should return "Text Document" or "Microsoft Office Document" or "Visual Studio Code File" and so on. similar to the properties displayed by Properties...
26
2795
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
6658
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) Location: class Week5MortgageGUI Week5MortgageLogic allint = logic.allInterest(amount, term, rate); Week5MortgageGUI.java:152:cannot find symbol symbol: method allInterest(double,double,double) Location: class Week5MortgageGUI
185
7121
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 return the file name given a FILE *. Questions: What would be the best name for this function?
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10208
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5294
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.