Hi, In order remove the file fiercely, then you have to use the OS in-built function than .net delete methods. [DllImport("kernel32", CharSet=CharSet.Auto, SetLastError=true)]
internal static extern bool MoveFileEx(string lpExistingFileName, string lpNewFileName, int dwFlags);Where you want to call this method, just pass first argument is path ,second will NULL and third will be 0x4. But If you want to clear registry, then you have to use the .NET Class Registry to delete. Because, delete the registry by OS function is very tricky and at the same time, if anything goes wrong, then it will be issue. http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx thank you |