Originally Posted by
Petr Schreiber
Hi
François,
I think you could achieve what you need like this:
uses "exe"
String version = EXE_GetVersionString(app_path + APP_Name) ' -- Retrieves the version of thinBasic executable
Petr
Hi Petr,
Thanks for your reply.
Unfortunately your example doesn't work with bundled scripts where the
returns the version set by the
#BUNDLE Version "FileVersion"
directive, and if it is not set "0.0.0.0" .
But hopefully this example leaded me to examine "APP_xxxx" functions.
I there found a workaround with
and extracting version of "thincore.dll"
Here the script I tried
'Trying to find version of thinbasic running
Uses "Console" , "exe"
#BUNDLE Version "FileVersion" , "1.2.3.45"
Dim bundled_script as word
Dim isolated_script as word
DIM version_x as String
dim program as string
dim isol_path as string
dim isol_interp as string
bundled_script = APP_IsBundled
isolated_script = APP_Isisolated
PrintL
PrintL "running" , bundled_script , iif$(bundled_script , " bundled" ," interpreted" ) in 15
PrintL "running" , isolated_script , iif$(isolated_script , " isolated" ," NOT isolated" ) in 15
program = (app_path + APP_Name)
PrintL "Program = " , program
version_x = EXE_GetVersionString ( program ) ' - - Retrieves the version of thinBasic executable
PrintL "Version = " , version_x
PrintL
printl
isol_path = APP_IsolationPath
printl "APP_IsolationPath", isol_path
isol_interp = isol_path & "thincore.dll"
printl " Version of " & isol_interp
printl $tab,$tab , EXE_GetVersionString ( isol_interp )
print "waiting " at 25,24
WaitKey
As you can see in interpreted test the APP_Isolation path is empty and version of thincore is returned.
Included view of results.version_find.png
Regards
François
Bookmarks