I can achieve my objective on MacOSX using applescript which installs a text-like file and then inserts a few lines of text into the program's settings file in the same folder. Final window has a launch option for the main program. For Windows, Inno Setup installs the file and then installs a second file which 'replaces' the settings file in the user's program appdata settings folder (as recommended by the program developer.) This is fine for new users but experienced users will not want their main settings file replaced.
My objective is to replicate the Mac process. Only way I know is to use a batch file (works on Win XP and 8) to insert the text into the settings file already on disk. AFAIK the batch file needs to be in same folder. Thus, the installer installs the initial file, then the batch file. This batch exe file needs to be 'run' and I want to find a method of deleting the batch file immediately after. Then the process is finished and proceed to final Inno Setup window. Is this possible and if so, how? Some sample code would be ideal if possible.
If there is a better approach than using a batch file, then that might be a better solution so there's no need to delete any files.
I've learnt a lot about using Inno Setup via StackOverflow over the past year but cannot find a solution to the above. This is a community project.