Tuesday, November 29, 2011 | |

How to Get System name through C#

First using Namespace 
using System.Security.Principal;


and then 

Process.Start("C:\\Documents and Settings\\"+WindowsIdentity.GetCurrent().Name.Split('\\')[1]+ "\\My Documents\\Company Details.xls ");

0 comments:

Post a Comment