diff --git a/cookiecutter.json b/cookiecutter.json
index a909ae3..4c6781c 100644
--- a/cookiecutter.json
+++ b/cookiecutter.json
@@ -18,6 +18,7 @@
"install_launcher": true,
"document_types": "",
"install_options": "",
+ "uninstall_options": "",
"installer_path": "_installer",
"post_install_script": "",
"pre_uninstall_script": "",
diff --git a/{{ cookiecutter.format }}/extras/{{ cookiecutter.installer_path }}/run_pre_uninstall.bat b/{{ cookiecutter.format }}/extras/{{ cookiecutter.installer_path }}/run_pre_uninstall.bat
index ec080ef..49dd9da 100644
--- a/{{ cookiecutter.format }}/extras/{{ cookiecutter.installer_path }}/run_pre_uninstall.bat
+++ b/{{ cookiecutter.format }}/extras/{{ cookiecutter.installer_path }}/run_pre_uninstall.bat
@@ -1,4 +1,7 @@
@echo off
setlocal enabledelayedexpansion
+{% for name in cookiecutter.uninstall_options -%}
+SET OPTION_{{ name.upper() }}=%{{ loop.index }}
+{% endfor -%}
CALL "%~dp0pre_uninstall.bat"
diff --git a/{{ cookiecutter.format }}/unicode.wxl b/{{ cookiecutter.format }}/unicode.wxl
index 97ee277..047016f 100644
--- a/{{ cookiecutter.format }}/unicode.wxl
+++ b/{{ cookiecutter.format }}/unicode.wxl
@@ -1,7 +1,18 @@
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
diff --git a/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs b/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs
index 3bf2740..215d4ba 100644
--- a/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs
+++ b/{{ cookiecutter.format }}/{{ cookiecutter.app_name }}.wxs
@@ -21,8 +21,10 @@
{% if cookiecutter.author_email -%}
{% endif -%}
+ {% if not cookiecutter.uninstall_options %}
+ {% endif %}
- {% for name, install_option in cookiecutter.install_options.items() %}
-
-
-
- {% endfor %}
- {% for name, install_option in cookiecutter.install_options.items() %}
-
+ {% for name, option in cookiecutter.install_options.items() %}
+ {% if option.default %}
+
+ {% endif %}
+ Condition="OPTION_{{ name.upper() }} <> "1"" />
+ {% endfor %}
+
+ {% for name, option in cookiecutter.uninstall_options.items() %}
+ {% if option.default %}
+
+ {% endif %}
+
{% endfor %}
+ {% if cookiecutter.install_options %}
+
+ {% endif %}
+ {% if cookiecutter.uninstall_options %}
+
+
+ {% endif %}
-
@@ -645,7 +666,8 @@
Control="Back"
Event="NewDialog"
Value="InstallOptionsDlg"
- Order="1" />
+ Order="1"
+ Condition="NOT Installed" />
{% else %}
+ Order="1"
+ Condition="NOT Installed" />
{% endif %}
{% endif %}
@@ -679,6 +702,71 @@
Value="BrowseDlg"
Order="2"/>
+
+
+
+
+
+ {% if cookiecutter.uninstall_options %}
+
+
+
+
+
+
+
+
+ {% else %}
+
+
+
+
+
+
+ {% endif %}
+