Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying a file to two dirs with Inno Setup
Message
From
11/02/2021 15:40:28
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
01678167
Message ID:
01678169
Views:
59
>Hi there,
>
>I'm using inno setup and want to install a file in two directories. So I wrote in the files-section:
>
>Source: "D:\Innosetups\programme_9\galorder.exe"; DestDir: {code:getbinpath}
>Source: "D:\Innosetups\programme_9\galorder.exe"; DestDir: {code:getprogpath}
>
>But that does not work, the file is only copied to the dir return by getprogpath. I checked both return values from the functions which return the path and they are correct.
>If I declare only one drective, it works, no matter which dir I use.
>Later I found an advice to use two different source dirs, so I changed to:
>
>Source: "D:\Innosetups\programme_Bin9\galorder.exe"; DestDir: {code:getbinpath}
>Source: "D:\Innosetups\programme_9\galorder.exe"; DestDir: {code:getprogpath}
>
>But that does not work either.
>Can someone tell me how this can be done?

For different reasons (wanted to have a camouflaged copy of the main exe, in case it vanished again), I had a small exe which ran after setup, and it would create the copy. It was something very simple, don't remember if it got complicated later by being made to do more things.
It's a three-liner (could do one but it would be too funny):
lcExeFrom=fullpath("firstfolder\mymain.exe")
lcExeTo=fullpath("secondfolder\mymain.exe")
copy file (lcExeFrom) to (lcExeTo)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform