[ Inno Setup Code ] Need Debug Code-VBForums
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
    3,817

    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 10:37 AM.

  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,101

    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 03: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.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.