如何使用inno setup在卸载期间添加确认任务? [英] How to add a confirm task during uninstall section by using inno setup?
问题描述
我的用户数据位于用户的文件夹中,例如:C:\ Users \ Administrator \ profile.ini
I have a user data located at user's folder such as : C:\Users\Administrator\profile.ini
我知道如何删除它:
[UninstallDelete]
Type: files; Name: "C:\Users\{username}\profile.ini"
问题是我不想默默地删除此文件,我需要最终用户通过复选框来通知此操作,例如"[]删除用户数据". 如果最终用户检查了它,请删除此文件,否则什么也不做.
The thing is i don't want to delete this file silently, i need the end-user informed about this operation with a checkbox, like "[ ] Delete user data". If end-user checks it, delete this file, otherwise do nothing.
我有两个问题:
-
是否可以获取当前日志记录用户的文件夹?我认为这不是像我在"C:\ Users {username} \"上面所做的那样的好方法.但是我找不到执行此操作的常量.
Is there a way to get the current logging user's folder? I don't think it's a good way like what i did above "C:\Users{username}\". But i couldn't find any constant for doing this.
是否可以在卸载开始时添加一个复选框?
Is it possible to add a checkbox at the beginning of uninstallation?
推荐答案
卸载程序不支持对向导UI进行更改.
The uninstaller does not support making changes to the wizard UI.
但是,您可以使用普通的[Code]
来用自定义表单或消息框提示用户.有关示例,请参见此类似问题的答案.
You can however use normal [Code]
to prompt the user with a custom form or message box. See this answer to a similar question for a sample.
这篇关于如何使用inno setup在卸载期间添加确认任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!