|
-
Nov 14th, 2006, 03:54 PM
#1
Thread Starter
Frenzied Member
[InnoSetup] How To Proceed UnInstall Upon Question
Hello,
Can someone help me create a messagebox that will ask the user a question.
If Yes then Delete files if No skip.
Currently i have the following: But the messagebox never shows up..
I think because i dont know how to call this from the UnInstallDelete section.
VB Code:
[Code]
// Ask the user a Yes/No question
begin
if MsgBox('Would you like to keep your Settings?', mbConfirmation, MB_YESNO) = IDNO then
begin
// Delete all files and directories
// but leave the directory itself
DelTree('{userappdata}\MySoft', True, True, True);
end;
end.
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Nov 14th, 2006, 04:01 PM
#2
Re: [InnoSetup] How To Proceed UnInstall Upon Question
In the code section don't you need procedures??? Check with Kleinma, he should know.
-
Nov 14th, 2006, 04:07 PM
#3
Thread Starter
Frenzied Member
Re: [InnoSetup] How To Proceed UnInstall Upon Question
In the code section don't you need procedures???
I guess i do.. i dont kow.. thats why im asking...
whos Kleinma ? user on forums..?
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Nov 14th, 2006, 04:13 PM
#4
Re: [InnoSetup] How To Proceed UnInstall Upon Question
Yes, He hangs out in the VB.Net forum... Send him a PM
-
Nov 14th, 2006, 04:40 PM
#5
Re: [InnoSetup] How To Proceed UnInstall Upon Question
INNO currently doesn't support calling code during uninstallation from the UninstallRun section. This section allows you to run certain files during uninstallation. Lets say maybe an exe that does something when you uninstall. I have heard they are planning to support calling code instead of launching a file in this section, but I have no idea when it may be implemented.
I noticed an article on INNO's newsgroup that may be of interest to you, but I am not sure how good you are with scripting in INNO
http://news.jrsoftware.org/news/inno.../msg11103.html
Read all the replies to that and the replies to the replies, because they made some adjustments to the originally posted code somewhere along the way.
The easier method (and the one I would recommend) is making an exe that you distribute with your app that is specifically for saving/deleting settings. You launch this exe in the [uninstallrun] section and it simply asks if they want to keep their settings, and if they say no, delete them right from that exe. Then the exe exits...
the uninstallrun section is run before any files are actually deleted as part of INNOs uninstallation, so you don't have to worry about your exe being deleted before it was run.
If you wanted to get a little fancier and not have to use a second exe to do this, you could build this functionality right into your main exe, but only trigger with with a commandline argument like /uninstall
when your exe is run with the /uninstall command, it simply prompts the messagebox and deletes settings if they indicate yes.
Does all that make sense?
-
Nov 15th, 2006, 09:29 AM
#6
Thread Starter
Frenzied Member
Re: [InnoSetup] How To Proceed UnInstall Upon Question
OK.. thanx for that...
I've already started doing my own .exe to uninstall stuff..
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

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
|