Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-03-2017, 07:43
Gupta Gupta is offline
Banned
 
Join Date: Aug 2016
Location: https://t.me/pump_upp
Posts: 399
Thanks: 139
Thanked 716 Times in 231 Posts
Gupta is on a distinguished road
Send a message via ICQ to Gupta Send a message via AIM to Gupta Send a message via Yahoo to Gupta
How to add unlimited Redists from an ini?

Code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define public RedistsINI ".\\Redists.ini"

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Run]
#ifnexist RedistsINI
  #error Ini for redists reading can't be find
#endif
#define public Section
#define public i
#define public Counter
#expr Counter =  0
#define public RedistFileName
#define public RedistWorkingDir
#define public RedistParameters
#define public RedistFlags
#define public RedistCheck
#sub AddRedist
  #expr Counter = Counter + 1
  #expr Section = StringChange("RedistCounter", "Counter", str(Counter) )
  #expr RedistFileName = ReadIni(SourcePath + RedistsINI , Section , "FileName")
  #expr RedistWorkingDir = Readini(SourcePath + RedistsINI , Section , "Workingdir","{src}")
  #expr RedistParameters = Readini(SourcePath + RedistsINI , Section , "Parameters","")
  #expr RedistFlags = Readini(SourcePath + RedistsINI , Section, "Flags","waituntilterminated skipifdoesntexist")
  #expr RedistCheck = Readini(SourcePath + RedistsINI , Section , "Checks","")
  Filename: "{#RedistFileName}"; WorkingDir: "{#RedistWorkingDir}" ; Parameters: {#RedistParameters}; Flags: {#RedistFlags}; Check: {#RedistCheck};
#endsub
#for { i = 1 ; ReadIni( SourcePath + RedistsINI, StringChange( "RedistCounter", "Counter", str(i)) , "FileName" , "" ) != "" ; i++ } AddRedist
Ini Structure should be

Code:
[Redist1]
FileName={src}\redist\DirectX\DXSETUP.exe
Workingdir={src}
Parameters=
Flags=waituntilterminated 
;Checks=IsWin64 and Installredist and CheckError

[Redist2]
FileName={src}\redist\vcredist\vcredist_x86.exe
Workingdir={src}
Parameters=/Q
Flags=waituntilterminated 
;Checks=not IsWin64 and Installredist and CheckError

[Redist3]
FileName={src}\redist\vcredist\vcredist_x64.exe
Workingdir={src}
Parameters=/Q
Flags=waituntilterminated 
;Checks=IsWin64 and Installredist and CheckError
For descriptions of Sectio, please reference inno help file
Section - [RUN]

Code is Written by me.
Reply With Quote
The Following 5 Users Say Thank You to Gupta For This Useful Post:
Cesar82 (28-03-2017), EzzEldin16 (05-01-2018), Razor12911 (14-03-2017), Simorq (16-07-2017), TWOELV (13-03-2017)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BlackBox v2 y_thelastknight Conversion Tutorials 567 11-03-2025 07:16
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
Inno Setup: Additional Libraries altef_4 Conversion Tutorials 50 21-10-2020 09:59
Useful Dll for Inno Setup users peterf1999 Conversion Tutorials 88 01-12-2017 16:00
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57



All times are GMT -7. The time now is 13:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com