Subject Re: Help f1 problem Solutiom
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Tue, 10 Sep 2024 19:16:03 +0530
Newsgroups dbase.getting-started

Good Evening Charlie,

> Wow I didn't catch that typo until just now.  So I have no idea as I had skipped the menu item and went with the f1 which sometime worked but sometimes did nothing.  Sometimes it even went to windows help!  I read some comments that f1 for help can be shaky.
>
> I worked on this some more this morning and found a good solution for the help menu item. In MiscAPI on line 1193 I it had been cBatchfile  = "Junk.bat"
> I hadn't seen this before.  On line 1212 the program is trying to create data.  The {app} folder in inno was non-writeable which was causing the error.  I simply changed the path on line 1193 to go to a writeable folder which should be the same for everyone using the inno setup.  It is actually an easy fix.
>
> I am going to write a try and catch for line 1212 just to be safe.  I have tested the 1293 correction but not the try and catch yet.  I'll do that after my dentist appointment!
>
> Thanks for your comment about the typo.  Sorry I originally missed it.
>

Sorry for missing this. runhidden() can accept 2 parameters. The first
is command and the second is batch file name. So you need not hard code
the path.

runhidden(cmd+chr(13)+chr(10)+cmd2+chr(13)+chr(10)+cmd21+chr(13)+chr(10)+cmd22+chr(13)+chr(10)+cmd3,'exp_inve.bat')

The above is a working command.

cmd,cmd2,cmd21,cmd22,cmd are valid strings built slightly earlier. One
example is

cmd3 = [copy /y ]+mcompany.unc+mcompany.direct+[\*.jpg ]+mcompany.remote_dir

All the commands are executed.

Regards
Akshat