View Single Post
  #1  
Old 01-02-2014, 07:20
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
altef_4 is on a distinguished road
Quote:
Originally Posted by Logrim View Post
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

Last edited by altef_4; 01-02-2014 at 07:26.
Reply With Quote
The Following 2 Users Say Thank You to altef_4 For This Useful Post:
Logrim (01-02-2014), papas (02-09-2016)
Sponsored Links