halocast Posted December 26, 2007 Posted December 26, 2007 Hi i have a problem that i hope u people can help!i have a Folder that i want to copy from the CD to the harddrive into a specified location how do i go about doing it? Filecopy?i need to copy the folder before the installation starts. i put the filecopy inside a function.. will it work?$CD1 = FindCD('EA70.exe')Run($CD1 & 'EA70.exe')FileCopy("$CD1\install\Enterprise Architect - Corporate Floating Edition\CD\EA Licences\sskeys.dat", "C:\EA Licences\", 9)Func FindCD($name) $cdrom = DriveGetDrive('CDROM') If Not @error Then For $i = 1 To $cdrom[0] If FileExists($cdrom[$i] & '\' & $name) Then Return $cdrom[$i] Next EndIfEndFunc(this is the beginning of the installation process); Welcome to Enterprise Architecture setupWinWaitActive("Enterprise Architect 7.0 Setup", "&Next")Send("!N")sleep(50);Welcome to Enterprise Architecture user agreementWinWaitActive("Enterprise Architect 7.0 Setup", "I &accept the license agreement")send("{UP}""!N")sleep(50);Sparx Systems Enterprise Architect 7.0 WindowWinWaitActive("Enterprise Architect 7.0 Setup", "Sparx Systems Enterprise Architect 7.0")send("!N")sleep(50)
PsaltyDS Posted December 26, 2007 Posted December 26, 2007 Where do you have a problem? FileCopy() doesn't care where the source or destination are, or if it's executed in or out of a function. What was the question? Did you try your code? Did it work? If not, what happened? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
MHz Posted December 27, 2007 Posted December 27, 2007 A variable and a literal string are different so keep them separate. $CD1 = FindCD('EA70.exe') Run($CD1 & '\EA70.exe') FileCopy($CD1 & "\install\Enterprise Architect - Corporate Floating Edition\CD\EA Licences\sskeys.dat", "C:\EA Licences\", 9) ; and the rest...
halocast Posted December 27, 2007 Author Posted December 27, 2007 Where do you have a problem? FileCopy() doesn't care where the source or destination are, or if it's executed in or out of a function. What was the question? Did you try your code? Did it work? If not, what happened? it appears to work now after i modified it A variable and a literal string are different so keep them separate. $CD1 = FindCD('EA70.exe') Run($CD1 & '\EA70.exe') FileCopy($CD1 & "\install\Enterprise Architect - Corporate Floating Edition\CD\EA Licences\sskeys.dat", "C:\EA Licences\", 9) ; and the rest... thanks i'll try this out..!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now