Jump to content

FileInstall to multiple locations?


 Share

Recommended Posts

How do I FileInstall the same file to multiple locations. Will autoit compile the same file into the exe multiple times(increasing the size of the exe) for each different path I want to extract it to? I am trying to find a way to include the file once but extract it to multiple locations as needed. Is this possible?

Link to comment
Share on other sites

  • Developers

How do I FileInstall the same file to multiple locations. Will autoit compile the same file into the exe multiple times(increasing the size of the exe) for each different path I want to extract it to? I am trying to find a way to include the file once but extract it to multiple locations as needed. Is this possible?

Fileinstall("xyz","firstlocation",1)

FileCopy("firstlocation","Secondlocation",1)

etc...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Fileinstall("xyz","firstlocation",1)

FileCopy("firstlocation","Secondlocation",1)

etc...

Sorry, let me provide more detail...

ex.

Select @OSBuild

Case "950" ; Windows 95 OEM Retail

Fileinstall("xyz.dll","location1",1)

Case "950A"; Windows 95 Retail SP1

Fileinstall("xyz.dll","location2",1)

Case "1111"; Windows 95 OEM Service Release 2

Fileinstall("xyz.dll","location3",1)

Case "1212"; Windows 95 OEM Service Release 2.1

Fileinstall("xyz.dll","location4",1)

Case "1214"; Windows 95 OEM Service Release 2.5

Fileinstall("xyz.dll","location5",1)

Case Else

EndSelect

Link to comment
Share on other sites

Sorry, let me provide more detail...

ex.

Select @OSBuild

Case "950" ; Windows 95 OEM Retail

Fileinstall("xyz.dll","location1",1)

Case "950A"; Windows 95 Retail SP1

Fileinstall("xyz.dll","location2",1)

Case "1111"; Windows 95 OEM Service Release 2

Fileinstall("xyz.dll","location3",1)

Case "1212"; Windows 95 OEM Service Release 2.1

Fileinstall("xyz.dll","location4",1)

Case "1214"; Windows 95 OEM Service Release 2.5

Fileinstall("xyz.dll","location5",1)

Case Else

EndSelect

replce location* with the actual location?

[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Link to comment
Share on other sites

How do I FileInstall the same file to multiple locations. Will autoit compile the same file into the exe multiple times(increasing the size of the exe) for each different path I want to extract it to? I am trying to find a way to include the file once but extract it to multiple locations as needed. Is this possible?

Fileinstall("xyz","firstlocation",1)

FileCopy("firstlocation","Secondlocation",1)

etc...

Fileinstall("xyz.dll", @TempDir & "\xyz.dll", 1)

Select @OSBuild

Case "950" ; Windows 95 OEM Retail

FileCopy(@TempDir & "\xyz.dll", "location1", 1)

Case "950A"; Windows 95 Retail SP1

FileCopy(@TempDir & "\xyz.dll", "location2", 1)

Case "1111"; Windows 95 OEM Service Release 2

FileCopy(@TempDir & "\xyz.dll", "location3", 1)

Case "1212"; Windows 95 OEM Service Release 2.1

FileCopy(@TempDir & "\xyz.dll", "location4", 1)

Case "1214"; Windows 95 OEM Service Release 2.5

FileCopy(@TempDir & "\xyz.dll", "location5", 1)

Case Else

EndSelect

Hope this will help you....

Edited by Danny35d
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

Sorry, let me provide more detail...

ex.

Select @OSBuild

Case "950" ; Windows 95 OEM Retail

Fileinstall("xyz.dll","location1",1)

Case "950A"; Windows 95 Retail SP1

Fileinstall("xyz.dll","location2",1)

Case "1111"; Windows 95 OEM Service Release 2

Fileinstall("xyz.dll","location3",1)

Case "1212"; Windows 95 OEM Service Release 2.1

Fileinstall("xyz.dll","location4",1)

Case "1214"; Windows 95 OEM Service Release 2.5

Fileinstall("xyz.dll","location5",1)

Case Else

EndSelect

Looks fine to me. Autoit does not seem include the same file twice.The 1st parameter needs to be a literal string(which can be the same file) and the 2nd parameter can be a variable. I have scripts with conditional statements similar to what you display using the same file, but they go to different paths.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...