I have a deployment project that installs a web
application. I have added an installer class to my
application project that gets called during install.
Using System.DirectoryServices.DirectoryEntry I can add a
group to the computer I am installing on. Currently I am
using the hard coded name of my computer. How can I find
out the name of the computer I am installing to?

FYI: I have tried to use the
System.Windows.Forms.SystemInformation class but it
doesn't seem to be available from my web project
Installer class.

Re: Determining the computer name I am installing to. by Nick

Nick
Sat Sep 13 02:18:56 CDT 2003

System.Environment.MachineName should do the trick.


Nick Wienholt, MVP
Maximizing .NET Performance
http://www.apress.com/book/bookDisplay.html?bID=217
Sydney Deep .NET User Group www.sdnug.org

"Tim Law" <timglaw@msn.com> wrote in message
news:2d0001c3798b$075f0a70$a601280a@phx.gbl...
> I have a deployment project that installs a web
> application. I have added an installer class to my
> application project that gets called during install.
> Using System.DirectoryServices.DirectoryEntry I can add a
> group to the computer I am installing on. Currently I am
> using the hard coded name of my computer. How can I find
> out the name of the computer I am installing to?
>
> FYI: I have tried to use the
> System.Windows.Forms.SystemInformation class but it
> doesn't seem to be available from my web project
> Installer class.
>