Hi all,
I want to do a program update based on the program version found
I've worked out the first bit so I can get the file version... all good
I'm trying to compare a string to the contents of a table
so that I do something different depending on what line of the table matched
-- check the registry to see if it's installed and then fiind out where.
exists = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Gabby");
path = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Gabby", "InstallPath", true);
-- get version info
version_info = File.GetVersionInfo( path .. "\\Gabby.exe");
fv = version_info.FileVersion;
fd = version_info.FileDescription
pv = version_info.ProductVersion;
-- show the user what version's installed so that they can manually update
Paragraph.SetText("Paragraph1", fd.. fv.." is currently installed. Please click the appropriate version item to proceed");
-- what I want to do is something like this
-- this is the contents of table 1
Gabby.exe 0.0.0.1
Gabby.exe 0.0.0.2
Gabby.exe 0.0.0.3
Gabby.exe 0.0.0.4
-- i want to search the table to find the matching entry and then do something depending on the result
if fd.. fv.. = (table row 1) then
File.Run("AutoPlay\\Docs\\update0001.exe", "", "", SW_SHOWNORMAL, false);
else
if fd.. fv.. = (table row 2) then
File.Run("AutoPlay\\Docs\\update0002.exe", "", "", SW_SHOWNORMAL, false);
else
etc..
-- but i can't see how to do it with only the 4 table commands listed in the help.
Does anyone have any suggestions
Gabby
I want to do a program update based on the program version found
I've worked out the first bit so I can get the file version... all good
I'm trying to compare a string to the contents of a table
so that I do something different depending on what line of the table matched
-- check the registry to see if it's installed and then fiind out where.
exists = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "\\SOFTWARE\\Gabby");
path = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Gabby", "InstallPath", true);
-- get version info
version_info = File.GetVersionInfo( path .. "\\Gabby.exe");
fv = version_info.FileVersion;
fd = version_info.FileDescription
pv = version_info.ProductVersion;
-- show the user what version's installed so that they can manually update
Paragraph.SetText("Paragraph1", fd.. fv.." is currently installed. Please click the appropriate version item to proceed");
-- what I want to do is something like this
-- this is the contents of table 1
Gabby.exe 0.0.0.1
Gabby.exe 0.0.0.2
Gabby.exe 0.0.0.3
Gabby.exe 0.0.0.4
-- i want to search the table to find the matching entry and then do something depending on the result
if fd.. fv.. = (table row 1) then
File.Run("AutoPlay\\Docs\\update0001.exe", "", "", SW_SHOWNORMAL, false);
else
if fd.. fv.. = (table row 2) then
File.Run("AutoPlay\\Docs\\update0002.exe", "", "", SW_SHOWNORMAL, false);
else
etc..
-- but i can't see how to do it with only the 4 table commands listed in the help.
Does anyone have any suggestions
Gabby
Comment