From 642d03e08b41f37545d637fb4436f4a342eec966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 10 Jul 2014 09:05:43 +0000 Subject: [PATCH] [APPWIZ] - Expand the registry entry when installing gecko package from disk. Now unattended setup can really be unattended. svn path=/trunk/; revision=63706 --- reactos/dll/cpl/appwiz/addons.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reactos/dll/cpl/appwiz/addons.c b/reactos/dll/cpl/appwiz/addons.c index e103bc5e7df..fa728cd72c9 100644 --- a/reactos/dll/cpl/appwiz/addons.c +++ b/reactos/dll/cpl/appwiz/addons.c @@ -214,6 +214,18 @@ static enum install_res install_from_registered_dir(void) return INSTALL_FAILED; } + if (type == REG_EXPAND_SZ) + { + size = ExpandEnvironmentStringsA(package_dir, NULL, 0); + if (size) + { + char* buf = heap_alloc(size + sizeof(addon->file_name)); + ExpandEnvironmentStringsA(package_dir, buf, size); + heap_free(package_dir); + package_dir = buf; + } + } + TRACE("Trying %s/%s\n", debugstr_a(package_dir), debugstr_a(addon->file_name)); ret = install_from_unix_file(package_dir, "", addon->file_name);