Tuesday, August 2, 2011

Some usufull Functions for C#

Create Your Own Test Certificate and add it to your solution (key certificate)
http://msdn.microsoft.com/en-us/library/ff699202.aspx



How to run application in startup in registry
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
key.SetValue("sysadmin", Application.ExecutablePath.ToString());


Get Current Directory of running application
System.Reflection.Assembly.GetExecutingAssembly().Location;

No comments:

Post a Comment