Here's a little code snippet that I use in most of my installers.
Typically; you change the version # in SUF to reflect a new version of your installer.
What if you want this version to auto-update with your main application file?
Put this in an included LUA script file or global functions:
Now in your "On startup" add this line:
For large installs, this does add a noticable install; but for most; it's quick enough.
Typically; you change the version # in SUF to reflect a new version of your installer.
What if you want this version to auto-update with your main application file?
Put this in an included LUA script file or global functions:
Code:
function SetupData.GetInternalFileVersion( cFileName ) local tFiles = SetupData.GetFileList(ARCHIVE_LIST); local cVersion="0.0.0.0"; if type(tFiles) == "table" then local x; for x = 1, Table.Count(tFiles) do if String.CompareNoCase(tFiles[x].FileName, cFileName )==0 then cVersion = tFiles[x].FileVersion; break; end end end return cVersion; end
Code:
SessionVar.Set("%ProductVer%", SetupData.GetInternalFileVersion("MYAPP.EXE") );
Comment