Click here to Skip to main content
11,645,087 members (65,672 online)
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 4:25am
Edited 1-Jan-11 4:26am
JF201553.9K
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 700
1 jyo.net 494
2 Sergey Alexandrovich Kryukov 449
3 Afzaal Ahmad Zeeshan 444
4 CPallini 386
0 OriginalGriff 1,065
1 Sergey Alexandrovich Kryukov 683
2 DamithSL 681
3 Afzaal Ahmad Zeeshan 662
4 CPallini 555


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 1 Jan 2011
Copyright © CodeProject, 1999-2015
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