Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

First contact with SF9, it's the right thing to do?

$
0
0
Hi! this is my first contact with Setup Factoy, i'm trying to create a draft version installer with Setup Factory trial, I wonder if this is the correct way to perform a check based on previously read a record written by a previous version of it to see if the version installed is above, equal or superior to that petende install.
I'm trying to do it this way and it seems to work but not if it is the right way. At the stage of Actions -> On Startup I use this ...

Code:

valor = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\FAD\\ACNTV", "Version", false);

if valor == "" then
        -- Nothing
else
        if valor == "09" then
        result = Dialog.Message("Notice", "Version already install in this PC", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
        Application.Exit();
        else
                if valor < "09" then
                        result = Dialog.Message("Notice", "There is already a version installed on this computer.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
                        Application.Exit();
                else
                        if valor > "09" then
                        result = Dialog.Message("Notice", "There is already a higher version installed on this computer.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
                        Application.Exit();
                        end
                end
        end
end

And in the Actions -> On Post Install i use this...

Code:

Registry.CreateKey(HKEY_LOCAL_MACHINE, "Software\\FAD\\ACNTV");
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\FAD\\ACNTV", "Version", "09", REG_SZ);

Comment I would appreciate your views on this to see if I am on track.
From already thank you very much!

Viewing all articles
Browse latest Browse all 2105

Trending Articles