I am creating an installer for a visual studio project using inno setup. I am getting an error for
"Parameter ValueData has invalid value"
for this code:
[Code]
function GetVersion(AppVersion: String): String;
var
Version: String;
CharIndex: integer;
c: char;
begin
for CharIndex := 1 to Length(AppVersion) do begin
c := AppVersion[CharIndex];
if (c <> '.') then
Version := Version + c;
end;
Result := Version;
end;
[Registry]
Root: HKCU; Subkey: "MyCompany\Product"; ValueType: DWORD ; ValueName: "Version" ; ValueData: GetVersion({#MyAppVersion}); Flags: uninsdeletekey;
I have versioning like this "1.0.0.3, 1.0.0.4, etc". So this program removes . and concatenates all of them to form a number and should pass back to write to registry. So, I can check this registry value and uninstall or update the previous version. I heard someone saying inno would upgrade automcatically, but I create icons with their name with version number. Thanks in advance.