I had developed a asp.net application using C#. I want to deploy it on client machine. I will be creating an .exe file which can be installed on client machine.
I need a code or script using which I can retrieve local machine name and user account name during installation of .exe file.
jamesdj7787
0 Points
3 Posts
Retrieve Machine Name and username during installation of ASP.N
Feb 01, 2013 04:49 AM|LINK
I had developed a asp.net application using C#. I want to deploy it on client machine. I will be creating an .exe file which can be installed on client machine.
I need a code or script using which I can retrieve local machine name and user account name during installation of .exe file.
Any help will be appreciated.
Thanks in Advance..
jprochazka
Contributor
4886 Points
740 Posts
Re: Retrieve Machine Name and username during installation of ASP.N
Feb 01, 2013 10:39 AM|LINK
You can get the users name by using System.Security.Principal and using the following code:
To get the machine name:
Of course as you know these will only work on an executable running on said machine.
Good luck.
jamesdj7787
0 Points
3 Posts
Re: Retrieve Machine Name and username during installation of ASP.N
Feb 02, 2013 06:17 AM|LINK
Thanks for your reply..
I had found the solution to retrieve username and computer name.
I used customActionData parameters [USERNAME] and [ComputerName] to retrieve and store.
Thanks once again.