Quote:
Originally Posted by Logrim
I have a problem, i want a custom form that when click install button, detect if the game is already installed and ofers unninstall it. I have the custom form made and attached in install button, the form works but allways appears, when game is installed and when not..
my code in the install button is this:
EDIT:Another question.. how to hide a custom form?
Thanks, and again sorry if my english is not god.
|
i can't write working example baset on this data, but i can see few errors
Code:
function NextButtonClick(CurPageID: Integer): Boolean;
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
if CurPageID = wpInstalling then begin
if IsWin64 then
if RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVer sion\Uninstall\Knights of the Old Republic_is1','UninstallString', Uninstall) then begin
DetectUnsLabel.Show;
DetectUninsForm.ShowModal;
Uninstall:=RemoveQuotes(Uninstall);
end;
end else begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVer sion\Uninstall\Knights of the Old Republic_is1','UninstallString', Uninstall) then begin
DetectUnsLabel.Show;
DetectUninsForm.ShowModal;
Uninstall:=RemoveQuotes(Uninstall);
end;
Result := not RadioButton_1.Checked;
end else Result := True;
end;
you not checked 64 bit version of windows, result of function can be null, and to write working example i need know what do radiobutton, unslabel,uninstall.
for hide customform use customform.hide, for delete use customform.free, customform := nil; if you use customform.showmodal then to close it use customform.modalresult := mrok; in ee version