看看老毛桃,心情来了卖弄一段小脚本
老毛桃格式化的启动U盘是FAT32格式,对于WIN7等自行订制的GHO文件,可能大于4GB,这是复制了的,怎么办?其实很简单,U盘做成启动后,老毛桃工具分割了U盘部分空间给隐藏了,默认大体330MB吧,剩下的可以格式化成NTFS即可,在WIN7下可以直接格,XP要绕个弯子,U盘属性-策略改为"为提高性能而优化"-重启计算机,就可以格式化成NTFS了.老毛桃一键还原,傻瓜式操作 一键轻松备份还原;程序为向导式安装,一键即可实现自动备份或还原系统。操作过程全程自动完成,即使是电脑新手,都能快速掌握使用。当您的系统操作变慢、中木马病毒、或是灾难性崩溃等任何情况,老毛桃一键还原都可以使您的系统轻松快速的还原到健康状态。
http://www.laomaotao.net/?L8488
--------------------------------------------------------------
心情来了,来段原创脚本-求硬盘ID-用于自己程序保护用吧
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_outfile=C:\Documents and Settings\HNNY-yanglq\桌面\HDD.EXE
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <WinAPI.au3>
$BLY_ZSENM0 = DllCall("Kernel32.dll", "int", "CreateFileMapping", "int", 0xFFFFFFFF, "int", 0, "int", 4, "int", 0, "int", 128, "str", "Ycczhsnctl0Osctu_")
$BLY_ZSENM1 = DllCall("kernel32.dll", "int", "GetLastError")
If $BLY_ZSENM0 <> 0 Then
If $BLY_ZSENM1 = 183 Then
MsgBox(0, "友情提醒您!" & $BLY_ZSENM0, "程序已经运行,不必连续双击鼠标!" & $BLY_ZSENM1)
DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $BLY_ZSENM0)
Exit
Else
MsgBox(0, "友情提醒您!" & $BLY_ZSENM0, "可以正常运行!" & $BLY_ZSENM1)
EndIf
Else
DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $BLY_ZSENM0)
Exit
EndIf
$BLB_XHYP = _YLQ_MYPM_ZHH(0)
If StringLen($BLB_XHYP) < 3 Then $BLB_XHYP = _YLQ_YJHQ_ZHH(1)
$BLB_XHCU = _YLQ_YJHQ_ZHH(2)
$BLB_XHWK = _YLQ_YJHQ_ZHH(3)
MsgBox(0, "HDD-CPU-MAC", $BLB_XHYP & Chr(10) & $BLB_XHCU & Chr(10) & $BLB_XHWK)
Func _YLQ_MYPM_ZHH($DiskID = "0")
$sPhysDisk = "\\.\PhysicalDrive" & $DiskID
Const $IOCTL_STORAGE_QUERY_PROPERTY = BitOR(BitShift(0x2D, -16), BitShift(0, -14), BitShift(0x500, -2), 0)
Const $DFP_RECEIVE_DRIVE_DATA = 0x7C088
Const $tagSTORAGEPROPERTYQUERY = "int PropertyId;int QueryType;byte AdditionalParams"
Const $tagSTORAGEDEVICEDESCRIPTOR = "ulong Version;ulong Size;byte DeviceType;byte DeviceTypeModifier;byte RemovableMedia;byte CommandQueueing;ulong VendorIdOffset;ulong ProductIdOffset;ulong ProductRevisionOffset;ulong SerialNumberOffset;int BusType;ulong RawPropertiesLength;byte RawDeviceProperties"
Const $tagSENDCMDOUTPARAMS = "dword Size;byte DriverError;byte IDEStatus;byte Reserved1;dword Reserved2;char Buffer"
Const $tagSENDCMDINPARAMS = "dword Size;byte Features;byte SectorCount;byte SectorNumber;byte CylLow;byte CylHigh;byte DriveHead;byte Command;byte Reserved;byte DriveNumber;byte Reserved1;dword Reserved2;byte Buffer"
$hDisk = _WinAPI_CreateFile($sPhysDisk, 2, 6, 6, 1)
If $hDisk = -1 Then
Return @error
EndIf
$tSCIP = DllStructCreate($tagSENDCMDINPARAMS)
$tSCOP = DllStructCreate($tagSENDCMDOUTPARAMS)
$tQuery = DllStructCreate($tagSTORAGEPROPERTYQUERY)
$tDescr = DllStructCreate($tagSTORAGEDEVICEDESCRIPTOR)
DllStructSetData($tQuery, "PropertyId", 0)
DllStructSetData($tQuery, "QueryType", 0)
$iResult = _YLQ_DIOCTL_ZHH($hDisk, $IOCTL_STORAGE_QUERY_PROPERTY, $tQuery, DllStructGetSize($tQuery), $tDescr, DllStructGetSize($tDescr))
If $iResult = 0 Then
Return @error
EndIf
If DllStructGetData($tDescr, "BusType") = 2 Then
DllStructSetData($tSCIP, "Command", 0xA1)
Else
DllStructSetData($tSCIP, "Command", 0xEC)
EndIf
$iResult = _YLQ_DIOCTL_ZHH($hDisk, $DFP_RECEIVE_DRIVE_DATA, $tSCIP, DllStructGetSize($tSCIP), $tSCOP, DllStructGetSize($tSCOP))
If $iResult = 0 Then
Return @error
Else
Dim $sSerialNum
For $i = 21 To 40 Step 2
$sSerialNum &= DllStructGetData($tSCOP, "Buffer", $i + 1)
$sSerialNum &= DllStructGetData($tSCOP, "Buffer", $i)
Next
$sSerialNum = StringReplace($sSerialNum, " ", "")
Return $sSerialNum
EndIf
_WinAPI_CloseHandle($hDisk)
EndFunc ;==>_YLQ_MYPM_ZHH
Func _YLQ_DIOCTL_ZHH($hDevice, $iCtrlCode, $pIn, $iIn, $pOut, $iOut, $pOverlapped = 0)
Local $iResult
If IsDllStruct($pIn) Then $pIn = DllStructGetPtr($pIn)
If IsDllStruct($pOut) Then $pOut = DllStructGetPtr($pOut)
If IsDllStruct($pOverlapped) Then $pOverlapped = DllStructGetPtr($pOverlapped)
$iResult = DllCall("Kernel32.dll", "int", "DeviceIoControl", "ptr", $hDevice, "dword", $iCtrlCode, "ptr", $pIn, "dword", $iIn, "ptr", $pOut, "dword", $iOut, "int*", 0, "ptr", $pOverlapped)
Return SetError(_WinAPI_GetLastError(), $iResult, $iResult)
EndFunc ;==>_YLQ_DIOCTL_ZHH
Func _YLQ_YJHQ_ZHH($YCC_QCXH = 2)
$colItems = ""
$YLQ_WMPUI = ""
$objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
Select
Case $YCC_QCXH = 1
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PhysicalMedia", "WQL", 0x10 + 0x20)
If IsObj($colItems) Then
For $objItem In $colItems
$YLQ_WMPUI = $objItem.SerialNumber
ExitLoop
Next
EndIf
Case $YCC_QCXH = 2
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", 0x10 + 0x20)
If IsObj($colItems) Then
For $objItem In $colItems
$YLQ_WMPUI = $objItem.ProcessorId
ExitLoop
Next
EndIf
Case $YCC_QCXH = 3
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=1", "WQL", 0x10 + 0x20)
If IsObj($colItems) Then
For $objItem In $colItems
$YLQ_WMPUI = $objItem.MACAddress
ExitLoop
Next
EndIf
$YLQ_WMPUI = StringReplace($YLQ_WMPUI, ":", "")
EndSelect
Return $YLQ_WMPUI
EndFunc ;==>_YLQ_YJHQ_ZHH 回复 1# nyylq
楼主怎么不把这个帖子发在源码区? 下次注意,呵呵 這個怎麼用呀
页:
[1]