Author Topic: Run two winbatch programs at the same time  (Read 52 times)

Jeff

  • Newbie
  • *
  • Posts: 32
Run two winbatch programs at the same time
« on: October 18, 2018, 07:30:10 am »
Is it possible to run two winbatch programs at the same time? I have one executable that calls another winbatch executable.

I keep getting a "DLL file could not be created. Probable cause of error is that you cannot write to disk or directory shown above."

The directory shown is the one I am call the script from....And I have permissions. I am assuming that since I am calling a WB program from another, the parent executable has already has the dll in use.
Jeff

JTaylor

  • Pundit
  • *****
  • Posts: 922
    • Data & Stuff Inc.
Re: Run two winbatch programs at the same time
« Reply #1 on: October 18, 2018, 07:42:51 am »
There is a compiler setting which tells it to not extract the DLLs.   Do that for the second one since you know the DLL will already exist.

Jim

td

  • Tech Support
  • *****
  • Posts: 2618
    • WinBatch
Re: Run two winbatch programs at the same time
« Reply #2 on: October 18, 2018, 09:09:56 am »
I wonder if something else is not going on here.  Normally, a compiled large executable script will check for the existence of the interpreter DLL and not attempt to extract it if it already exists.  When a DLL is loaded into a process it is write protected but not read protected so the second EXE should have no problems detecting and loading the existing DLL, when they are located and launched from the same directory.   The only cause that comes to mind is that the EXEs have different manifest settings or they are not actually located in the same directory.  That doesn't mean that there isn't another explanation of some kind.

<Edit> I realized that I was assuming the interpreter or an extender DLL was the problem child.  But the executable does not check for the existence of "other" files before extraction so one of them could cause the problem. 
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


Jeff

  • Newbie
  • *
  • Posts: 32
Re: Run two winbatch programs at the same time
« Reply #3 on: October 18, 2018, 10:23:59 am »
Thanks for the information. Apparently, my 2nd standalone or child executable had a 3rd party exe as part of the self extractor. Once I removed it, it would run correctly.
Jeff