This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18081|Reply: 0

[WinForm] C# calls RunDll32.exe clean up browser cache and junk

[Copy link]
Posted on 11/7/2014 2:48:40 PM | | | |


  1. RunCmd("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8");

  2. void RunCmd(string cmd)
  3.         {
  4.             System.Diagnostics.Process p = new System.Diagnostics.Process();
  5.             p.StartInfo.FileName = "cmd.exe";
  6.             // 关闭Shell的使用
  7.             p.StartInfo.UseShellExecute = false;
  8.             // 重定向标准输入
  9.             p.StartInfo.RedirectStandardInput = true;
  10.             // 重定向标准输出
  11.             p.StartInfo.RedirectStandardOutput = true;
  12.             //重定向错误输出
  13.             p.StartInfo.RedirectStandardError = true;
  14.             p.StartInfo.CreateNoWindow = true;
  15.             p.Start();
  16.             p.StandardInput.WriteLine(cmd);
  17.             p.StandardInput.WriteLine("exit");
  18.         }
Copy code
Here are some other parameters:
Temporary Internet Files
            //RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
            //Cookies
            //RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
            History
            //RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
            Form Data
            //RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
            Passwords
            //RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
            Delete All
            //RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
            //Delete All - "Also delete files and settings stored by add-ons"
            //RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351


Learning never ends





Previous:java uses Random to generate pseudo-random numbers and make verification codes
Next:A little game made by JavaScript
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com