Sign in to follow this  
Followers 0
halocast

Copy Folder from CD to a specified folder

4 posts in this topic

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

EndIf

EndFunc

(this is the beginning of the installation process)

; Welcome to Enterprise Architecture setup

WinWaitActive("Enterprise Architect 7.0 Setup", "&Next")

Send("!N")

sleep(50)

;Welcome to Enterprise Architecture user agreement

WinWaitActive("Enterprise Architect 7.0 Setup", "I &accept the license agreement")

send("{UP}""!N")

sleep(50)

;Sparx Systems Enterprise Architect 7.0 Window

WinWaitActive("Enterprise Architect 7.0 Setup", "Sparx Systems Enterprise Architect 7.0")

send("!N")

sleep(50)

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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...

:)

Share this post


Link to post
Share on other sites

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..!

:P

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0