Ok, here thinBasic has a problem and at the moment I do not know how to solve.
A bundled exe is a sort of .ZIP file containing all the files (original script in obfuscated way plus thinBasic.exe plus all needed modules) needed to execute the original script without the need to have thinBasic installed on the target machine.
When you call first bundled exe: all files are exploded on disk (as system hidden files) in the same directory of the exe
When the first script try to OS_Shell the second bundled exe, it try to explode mainly the same files of the first, but they are already there so an internal error would occur and second exe will not be executed.
Maybe an option could be to create bundled exe setting the flag "Activate Isolation"This flag instruct the bundled exe that when it is executed, explosion of all the files must take place into a random named directory created under current bundled exe directory. In such a way there will be no conflict between different bundled exe execution.
So if you execute your script from something like C:\thinBasic\SampleScripts\OS\Test\
in reality it will be executed from something like C:\thinBasic\SampleScripts\OS\Test\z8216tmp\
In this case your script 1 should calculate the directory from which execute script 2 (is quite easy using somthing like Dim NextScript_Path As String = LEFT$(LEFT$(APP_ScriptPath, -1), InStr(-1, LEFT$(APP_ScriptPath, -1), "\")))
But I have tested this option and script 2 seems executed not from C:\thinBasic\SampleScripts\OS\Test\xxxxtmp\ but from C:\thinBasic\SampleScripts\OS\Test\xxxxtmp\z8216tmp\
So it seems bundled exe takes its current directory from the caller bundled exe and not from its exe path
So, I'm sorry but I do not a solution right now using bundled exe.
Last chance is to use obfuscated scripts, their execution is like executing a normal script (so previous examples should work) and change script extension to .tBasicx
The problem here is that you must have thinBasic installed in your target machine.
Bookmarks