Click here to Skip to main content
11,715,425 members (80,334 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
JF201554K
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 Sergey Alexandrovich Kryukov 485
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 125
0 Sergey Alexandrovich Kryukov 785
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320


Advertise | Privacy | Mobile
Web03 | 2.8.150901.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