Jump to content

barraroo

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by barraroo

  1. Solution worked perfectly, modified some code from the FileExists() help page to make this: #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> ;Finds the drive path of the USB Local $aArray = DriveGetDrive($DT_REMOVABLE) If @error Then ;An error occurred when retrieving the drives. MsgBox($MB_SYSTEMMODAL, "", "It appears an error occurred.") Else For $i = 1 To $aArray[0] ;Show all the drives found and convert the drive letter to uppercase. ;MsgBox($MB_SYSTEMMODAL, "", "Drive " & $i & "/" & $aArray[0] & ":" & @CRLF & StringUpper($aArray[$i])) If FileExists($aArray[$i]&"\setup\USB_Search_Target") Then ;Removes setup folder because DirCopy is stupid and needs to create a new folder DirRemove("C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup") sleep(200) ;Moves main scripts & installers to C:\ DirCopy($aArray[$i]&"\Setup","C:\Install_notes\Setup",1) sleep(200) ;Moves the startup script to startup folder DirCopy($aArray[$i]&"\StartupController","C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup",1) sleep(500) Shutdown(6) ;MsgBox(4096,"","Test Works") EndIf Next EndIf
  2. Hi there, I am trying write a script that begins by moving a folder from a newly inserted USB onto C:\ of the host computer. At the moment I am using DirCopy("X:\Setup","C:\Install_notes\Setup") where X:\ is the USB. Unfortunately, every time I insert the USB into a new computer the USB directory letter will be randomly changed. Is there a way to set the location of the FileMove script as the source directory or any other method of executing this?
  3. I am a newbie to autoit and trying to get the mouseclick function to automatically press a button as part of an install process. After trying and failing to use ControlClick and MouseClick with a co-ords specified. I tried to simplify the code as far as possible however it is still not working. What am I doing wrong here? ShellExecute("npp.7.8.1.Installer.x64.exe") WinWaitActive("Installer Language") sleep(3000) MouseClick("left")
×
×
  • Create New...