Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have a Visual Studio Setup Project, with a Custom Dialog with one Textbox. The default-content of this textbox should be the hostname of the PC, where the Setup was startet. How can I do this? Is this possible, if I override the Install-Method or do I need another way?

Thanks
Posted
Updated 1-Jan-11 4:26am
v2

Put this code intot he form's constructor AFTER the call to InitializeComponent():

C#
string hostName = Dns.GetHostName();
textBox.Text = "PC HostName";


 
Share this answer
 
Comments
#realJSOP 1-Jan-11 10:44am    
From OP: I don't think that this is possible on a setup-project? I can't access Textboxes in a Setup-Project this way.
A google search for ".Net custom forms in setup project" revealed this link. It may or may not help. You should get about 308,000 hits if you google search the same phrase.

http://www.c-sharpcorner.com/UploadFile/mgold/CustomInstallMG11102005235312PM/CustomInstallMG.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900