Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying a file to two dirs with Inno Setup
Message
 
À
11/02/2021 15:40:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Divers
Thread ID:
01678167
Message ID:
01678177
Vues:
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)
Hi Dragan,

thank you for your suggestion. In fact I do already have an exe which runs after setup and I could implement it. But I also found the posssibility to cal a way to call a function "afterinstall" in the files-section and I will try this too.

Best regards

Thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform