-
Dec 28th, 2007, 04:34 AM
#1
Thread Starter
Junior Member
[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.
-
Dec 28th, 2007, 08:50 AM
#2
Thread Starter
Junior Member
Re: [Inno 5.2] Uninstall before Install
Here is what I was able to find:
PHP Code:
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: Integer;
Uninstall: String;
begin
if (CurStep = ssInstall) then begin
if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram_is1', 'UninstallString', Uninstall) then begin
MsgBox('Warning: Old Version will be removed!', mbInformation, MB_OK);
Exec(RemoveQuotes(Uninstall), ' /SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end;
end;
end;
If you have other suggestions, comments, please share.
Vista Error #01: Insufficient money spent in hardware.
-
Dec 28th, 2007, 01:40 PM
#3
Re: [Inno 5.2] Uninstall before Install
Did this solve the issue for you?
-
Dec 28th, 2007, 01:47 PM
#4
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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
-
Dec 28th, 2007, 05:54 PM
#5
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|