Я использую BalExtension с WixStandardBootstrapperApplication.HyperlinkSidebarLicense
Я хочу всегда устанавливать приложение в локальную папку данных приложения текущего пользователя, если они не меняли каталог установки на странице параметров. Он отлично работает, когда я выполняю установку КОГДА Я НАЖИМАЮ КНОПКУ ОПЦИЙ и нажимаю ОК
Но если я выполняю установку, не нажимая на страницу параметров. Вместо этого он получит папку данных приложения администратора.
У меня есть burn.wxs
настройка, подобная этой
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle
Name="My Installer"
Version="1.0.0.0"
IconSourceFile="icon.ico"
Manufacturer="Me">
<Variable Name="InstallFolder" Type="string" Value="[LocalAppDataFolder]"/>
...
<Chain>
<ExePackage
SourceFile="PreReqDrivers.exe"
InstallCommand="/S"
UninstallCommand="/S"
PerMachine="yes">
...
</ExePackage>
<MsiPackage SourceFile="Main.msi">
<MsiProperty Name="INSTALLDIR" Value="[InstallFolder]\Test\" />
</MsiPackage>
</Chain>
</Bundle>
...
</Wix>
Есть ли способ всегда по умолчанию использовать данные локального приложения текущего пользователя независимо от того, они нажимают кнопку параметров или нет.
Я собрал 2 журнала, когда устанавливаю его, не касаясь кнопки параметров и при нажатии кнопки параметров.
OptionButton Not Touched:
[1C0C:2CD4][2020-07-09T16:25:45]i001: Burn v3.14.0.4118, Windows v10.0 (Build 18363: Service Pack 0), path: C:\Users\CURRENTUSER\My Installer.exe
[1C0C:2CD4][2020-07-09T16:25:45]i000: Initializing string variable 'InstallFolder' to value '[LocalAppDataFolder]'
...
[1C0C:2CD4][2020-07-09T16:25:53]i201: Planned package: PreReqDrivers.exe, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[1C0C:2CD4][2020-07-09T16:25:53]i201: Planned package: Main.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[1C0C:2CD4][2020-07-09T16:25:53]i299: Plan complete, result: 0x0
[1C0C:2CD4][2020-07-09T16:25:53]i300: Apply begin
[1C0C:2CD4][2020-07-09T16:25:53]i010: Launching elevated engine process.
[1C0C:2CD4][2020-07-09T16:25:58]i011: Launched elevated engine process.
[1C0C:2CD4][2020-07-09T16:25:58]i012: Connected to elevated engine.
[26FC:48FC][2020-07-09T16:25:58]i358: Pausing automatic updates.
[26FC:48FC][2020-07-09T16:25:58]i359: Paused automatic updates.
[26FC:48FC][2020-07-09T16:25:58]i360: Creating a system restore point.
[26FC:48FC][2020-07-09T16:25:58]i361: Created a system restore point.
...
[26FC:48FC][2020-07-09T16:26:00]i301: Applying execute package: PreReqDrivers.exe, action: Install, path: C:\ProgramData\Package Cache\[GUID?]\PreReqDrivers.exe, arguments: '"C:\ProgramData\Package Cache\[GUID?]\PreReqDrivers.exe" /S'
[1C0C:2CD4][2020-07-09T16:26:05]i319: Applied execute package: PreReqDrivers.exe, result: 0x0, restart: None
[26FC:48FC][2020-07-09T16:26:05]i323: Registering package dependency provider: {...GUID...}, version: 1.0, package: Main.msi
[26FC:48FC][2020-07-09T16:26:05]i301: Applying execute package: Main.msi, action: Install, path: C:\ProgramData\Package Cache\{...GUID...}v1.0\Main.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLDIR="C:\Users\admin\AppData\Local\\Test\"'
[1C0C:2CD4][2020-07-09T16:26:13]i319: Applied execute package: Main.msi, result: 0x0, restart: None
[26FC:48FC][2020-07-09T16:26:13]i325: Registering dependency: {...GUID...} on package provider: {...GUID...}, package: Main.msi
...
[1C0C:2CD4][2020-07-09T16:26:14]i410: Variable: InstallFolder = C:\Users\CURRENTUSER\AppData\Local\
[1C0C:2CD4][2020-07-09T16:26:14]i410: Variable: LocalAppDataFolder = C:\Users\CURRENTUSER\AppData\Local\
...
[1C0C:2CD4][2020-07-09T16:26:14]i007: Exit code: 0x0, restarting: No
OptionButton Touched:
[3FE8:16B8][2020-07-09T16:30:53]i001: Burn v3.14.0.4118, Windows v10.0 (Build 18363: Service Pack 0), path: C:\Users\CURRENTUSER\AppData\Local\Temp\{15330765-B5AB-491D-84A2-D39A5A851BF6}\.cr\My Installer.exe
[3FE8:16B8][2020-07-09T16:30:53]i000: Initializing string variable 'InstallFolder' to value '[LocalAppDataFolder]'
...
[3FE8:16B8][2020-07-09T16:30:59]i201: Planned package: PreReqDrivers.exe, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None
[3FE8:16B8][2020-07-09T16:30:59]i201: Planned package: Main.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[3FE8:16B8][2020-07-09T16:30:59]i299: Plan complete, result: 0x0
[3FE8:16B8][2020-07-09T16:30:59]i300: Apply begin
[3FE8:16B8][2020-07-09T16:30:59]i010: Launching elevated engine process.
[3FE8:16B8][2020-07-09T16:31:03]i011: Launched elevated engine process.
[3FE8:16B8][2020-07-09T16:31:03]i012: Connected to elevated engine.
[36D8:36DC][2020-07-09T16:31:03]i358: Pausing automatic updates.
[36D8:36DC][2020-07-09T16:31:03]i359: Paused automatic updates.
[36D8:36DC][2020-07-09T16:31:03]i360: Creating a system restore point.
[36D8:36DC][2020-07-09T16:31:03]i361: Created a system restore point.
...
[36D8:36DC][2020-07-09T16:31:05]i301: Applying execute package: PreReqDrivers.exe, action: Install, path: C:\ProgramData\Package Cache\[GUID?]\PreReqDrivers.exe, arguments: '"C:\ProgramData\Package Cache\[GUID?]\PreReqDrivers.exe" /S'
[3FE8:16B8][2020-07-09T16:31:10]i319: Applied execute package: PreReqDrivers.exe, result: 0x0, restart: None
[36D8:36DC][2020-07-09T16:31:10]i323: Registering package dependency provider: {...GUID...}, version: 1.0, package: Main.msi
[36D8:36DC][2020-07-09T16:31:10]i301: Applying execute package: Main.msi, action: Install, path: C:\ProgramData\Package Cache\{...GUID...}v1.0\Main.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLDIR="C:\Users\CURRENTUSER\AppData\Local\\Test\"'
[3FE8:16B8][2020-07-09T16:31:18]i319: Applied execute package: Main.msi, result: 0x0, restart: None
[36D8:36DC][2020-07-09T16:31:18]i325: Registering dependency: {...GUID...} on package provider: {...GUID...}, package: Main.msi
...
[3FE8:16B8][2020-07-09T16:31:19]i410: Variable: InstallFolder = C:\Users\CURRENTUSER\AppData\Local\
[3FE8:16B8][2020-07-09T16:31:19]i410: Variable: LocalAppDataFolder = C:\Users\CURRENTUSER\AppData\Local\
...
[3FE8:16B8][2020-07-09T16:31:19]i007: Exit code: 0x0, restarting: No