Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RokuKevin
Visitor

Tracking Application install and version state

Applications may wish to take different actions on startup depending on if it is the application's first run, and if it is an application upgrade or a clean install. This can be easily determined by saving state in the registry. Here is an example function:

Function RunStatus()
currentversion = "1.3"
s = CreateObject("roRegistrySection", "Version")
if not s.Exists("Number") then
return "first-run-clean-install"
elseif s.Read("Number") = currentversion then
return "re-run"
else
return "first-run-upgrade"
end if
end Function
0 Kudos