Results 1 to 5 of 5

Thread: [RESOLVED]|[Inno 5.2] Uninstall before Install

  1. #1

    Thread Starter
    Junior Member RingOfFire's Avatar
    Join Date
    May 2006
    Location
    Istanbul
    Posts
    28

    Resolved [RESOLVED]|[Inno 5.2] Uninstall before Install

    Hi,

    I'm using Inno Setup (5.2) for updating my software. Setup detects previous installation files and replaces them correctly. If no installation is found setup quits.

    However, now I need to modify my Inno Script which will proceed with upgrade as usual but should uninstall previous installation first. I think it will be done by adding "silentuninstall" somewhere in the script but I've never did this. Can someone help me with a sample? or an example link?

    I think this should be done in CurStepChanged(ssInstall) but have no idea how to proceed...

    Thank you!
    Last edited by RingOfFire; Dec 28th, 2007 at 05:56 PM.
    Vista Error #01: Insufficient money spent in hardware.

  2. #2

    Thread Starter
    Junior Member RingOfFire's Avatar
    Join Date
    May 2006
    Location
    Istanbul
    Posts
    28

    Re: [Inno 5.2] Uninstall before Install

    Here is what I was able to find:

    PHP Code:
    procedure CurStepChanged(CurStepTSetupStep);
    var
      
    ResultCodeInteger;
      
    UninstallString;
    begin
      
    if (CurStep ssInstallthen begin
        
    if RegQueryStringValue(HKLM'Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram_is1''UninstallString'Uninstallthen begin
          MsgBox
    ('Warning: Old Version will be removed!'mbInformationMB_OK);
          
    Exec(RemoveQuotes(Uninstall), ' /SILENT'''SW_SHOWNORMALewWaitUntilTerminatedResultCode);
        
    end;
      
    end;
    end
    If you have other suggestions, comments, please share.
    Vista Error #01: Insufficient money spent in hardware.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [Inno 5.2] Uninstall before Install

    Did this solve the issue for you?

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: [Inno 5.2] Uninstall before Install

    If you have other suggestions, comments, please share.
    One would deduce that more input is desired.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Junior Member RingOfFire's Avatar
    Join Date
    May 2006
    Location
    Istanbul
    Posts
    28

    Resolved Re: [Inno 5.2] Uninstall before Install

    I hoped to see other proposals, but nothing yet.

    And yes, thread will be marked as solved.

    Thank you for reading...
    Vista Error #01: Insufficient money spent in hardware.

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