[RESOLVED]|[Inno 5.2] Uninstall before Install-VBForums
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 04: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
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,334

    Re: [Inno 5.2] Uninstall before Install

    Did this solve the issue for you?
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

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

    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!
    Star Wars Gangsta Rap 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 Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.