假如U盘病毒使用的启动脚本autorun.inf文件,内容为下面代码
====================================[AuToRun]
open=eyi.exe
shell\open=打开(&O)
shell\open\eyi.exe
shell\explore\eyi.exe====================================
请问用C#如何获取open=后面的可执行文件的(eyi.exe)文件名?小弟初学C#,U盘经常中病毒,想自己写个清除工具!代码越简单越好!复杂了可能看不懂哦!
====================================[AuToRun]
open=eyi.exe
shell\open=打开(&O)
shell\open\eyi.exe
shell\explore\eyi.exe====================================
请问用C#如何获取open=后面的可执行文件的(eyi.exe)文件名?小弟初学C#,U盘经常中病毒,想自己写个清除工具!代码越简单越好!复杂了可能看不懂哦!
private static extern bool GetPrivateProfileString(string lpApplicationName,string lpKeyName,string lpDefault,StringBuilder lpReturnedString,int nSize,string lpFileName); private void button1_Click(object sender, EventArgs e)
{
StringBuilder strValue = new StringBuilder(256);
GetPrivateProfileString("AuToRun", "open", "error", strValue, strValue.Capacity, "c:\\autorun.inf");
MessageBox.Show(strValue.ToString());
}