Sign in to follow this  
Followers 0
billym

FileInstall to multiple locations?

6 posts in this topic

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?

Share this post


Link to post
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...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
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.

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