Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Visual-Studio setup
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 1-Jan-11 5:25am
Edited 1-Jan-11 5:26am
JF201553.3K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Put this code intot he form's constructor AFTER the call to InitializeComponent():
 
string hostName = Dns.GetHostName();
textBox.Text = "PC HostName";

  Permalink  
Comments
   
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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 6,769
1 Sergey Alexandrovich Kryukov 6,338
2 DamithSL 5,408
3 Manas Bhardwaj 4,816
4 Maciej Los 4,195


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 1 Jan 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100