那么多人想要源码,顺手将它反了。#NoTrayIcon
#region
#AutoIt3Wrapper_icon=setting.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=本程序会在系统启动菜单中加入“从光驱启动”,免去去BIOS设置的麻烦,也方便菜鸟!
#AutoIt3Wrapper_Res_Description=By kn007
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=kn007@126.com
#endregion
FileInstall("bootsect.cdr", @TempDir & "\bootsect.cdr")
If MsgBox(8484, "本程序将在系统启动菜单中加入“从光驱启动” By kn007 ", "如果因为安装本程序而造成未知错误,您自己负责!好了,您是否现在安装本程序?(10秒等待)", 10) = 6 Then
FileCopy(@TempDir & "\bootsect.cdr", "C:", 9)
FileDelete(@TempDir & "\bootsect.cdr")
FileSetAttrib("C:\bootsect.cdr", "+RASH")
If FileExists("C:\boot.ini") Then
FileSetAttrib("C:\boot.ini", "-RASH")
$FILE = "C:\boot.ini"
$STR = StringRegExpReplace(FileRead($FILE), "timeout\s*=\s*\d+", "timeout=5")
$TMP_FILE = FileOpen($FILE, 2)
FileWrite($FILE, $STR)
FileClose($TMP_FILE)
If StringInStr(FileRead($FILE), "C:\bootsect.cdr") Then
FileSetAttrib("C:\boot.ini", "+RASH")
Exit
Else
FileWriteLine("C:\boot.ini", "C:\bootsect.cdr=Boot From CD-ROM")
FileSetAttrib("C:\boot.ini", "+RASH")
MsgBox(64, "安装完毕! By kn007 ", "谢谢您的支持,我的E-Mail是kn007@126.com", 5)
Exit
EndIf
Else
MsgBox(4096, "警告 !!! By kn007 ", "您的系统没有启动菜单文件,请确认您的系统是本程序支持的!", 5)
FileDelete(@TempDir & "\bootsect.cdr")
Exit
EndIf
Else
FileDelete(@TempDir & "\bootsect.cdr")
Exit
EndIf
|