Results 1 to 4 of 4

Thread: [ Inno Setup Code ] Need Debug Code

  1. #1

    Thread Starter
    New Member amin fear's Avatar
    Join Date
    Jan 2009
    Location
    IRAN - Qom Town
    Posts
    7

    [ Inno Setup Code ] Need Debug Code

    i have an Inno setup script with pascal code that replaces " About Setup... " dialog box text with a favorite & custom text from inside the code ... this code seems to be working & when running compiled setup , it changes the dialog box text perfectly ... but when exiting the setup program , installer seems to crash & after closing shows "not responding error" ... any expert here please take a look at script & debug it ? or at least tell me how can i revise the script ? please ?

    this is the link of source :
    http://rghost.net/42435000

  2. #2
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: [ Inno Setup Code ] Need Debug Code

    You can place the inno script code right into your post here:
    Code:
    [Setup] 
    AppName=My Program 
    AppVerName=My Program v 1.5 
    DefaultDirName={pf}\My Program 
    OutputDir=. 
      
    [Languages] 
    Name: "english"; MessagesFile: "compiler:Default.isl"
     
    [Files] 
    Source: CallbackCtrl.dll; Flags: dontcopy 
      
    [Code] 
    type 
      TWFProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint; 
     
    function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam: Longint; lParam: Longint): Longint; external 'CallWindowProcA@user32.dll stdcall'; 
    function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall'; 
    function WrapWFProc(Callback: TWFProc; ParamCount: Integer): Longword; external 'wrapcallbackaddr@files:CallbackCtrl.dll stdcall'; 
      
    var 
      OldProc:Longint; 
     
    procedure AboutSetupClick; 
    begin 
      //Replacing the menu About" 
      MsgBox('custom text', mbInformation, MB_OK);
    end; 
     
    function WFWndProc(h:HWND;Msg,wParam,lParam:Longint):Longint;  
    begin 
      if (Msg=$112) and (wParam=9999) then begin 
        Result:=0; 
        AboutSetupClick; 
      end else begin 
        if Msg=$2 then SetWindowLong(WizardForm.Handle,-4,OldProc); 
        Result:=CallWindowProc(OldProc,h,Msg,wParam,lParam); 
      end;  
    end; 
     
    procedure InitializeWizard; 
    begin 
      OldProc:=SetWindowLong(WizardForm.Handle,-4,WrapWFProc(@WFWndProc,4)); 
    end;
    Just use: [code][noparse]Inno script here...[/code][/noparse]
    Last edited by JuggaloBrotha; Dec 24th, 2012 at 11:37 AM.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  3. #3
    New Member
    Join Date
    Feb 2013
    Posts
    1

    Re: [ Inno Setup Code ] Need Debug Code

    please explain yourself, what do u mean about [noparse] ? i get crash error when the setup close...

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: [ Inno Setup Code ] Need Debug Code

    [QUOTE=dd1os;4342445]please explain yourself, what do u mean about [noparse] ? i get crash error when the setup close... [/QUOTE]

    The [noparse] is a mistake in JuggaloBrotha's post! You only need to use the code within the code block (has a light blue background).
    Last edited by Nightwalker83; Feb 13th, 2013 at 04:41 AM. Reason: Fixed spelling!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width