We want to always use a new krb5.ini (and our search order guarantees
that we will), but users might be confused if there is still a file
named krb5.ini in the old location which is now non-functional.
However, it is rude to unconditionally delete the old file which may
potentially be the only copy a user has of their local changes.
Instead, rename the old file to a non-functioning name that indicates
it is no longer being used, so that it may be consulted if needed.
Only attempt the rename if we found an existing krb5.ini, and ignore errors
since this is not a critical part of the installation.
(cherry picked from commit
02499b9c31124d66cdc5fd5d650e38f8c408a984)
ticket: 7328
status: resolved
$(MSIFILE): $(OBJFILE) $(CUSTOMDLL)
$(LIGHT) -out $@ $(OBJFILE) \
- -loc lang\strings_$(LANG).wxl
+ -loc lang\strings_$(LANG).wxl -ext WixUtilExtension.dll
$(CUSTOMDLL): custom\custom.cpp
$(CD) custom
Return="ignore"
Execute="deferred" />
+ <CustomAction Id="RenameKrb5Ini_Cmd"
+ Property="RenameKrb5Ini"
+ Value=""cmd.exe" /c rename "[WindowsFolder]\krb5.ini" krb5-ini-pre-kfw4"
+ Execute="immediate" />
+ <CustomAction
+ Id="RenameKrb5Ini"
+ BinaryKey="WixCA"
+ DllEntry="CAQuietExec"
+ Execute="deferred"
+ Impersonate="no"
+ Return="ignore" />
+
<CustomAction
Id="RollbackNetProvider"
BinaryKey="binCustom"
<InstallExecuteSequence>
<Custom Action="KillRunningProcesses" After="InstallValidate"/>
<RemoveExistingProducts After="KillRunningProcesses">(Not Installed) And (UPGRADEPISMERE Or UPGRADEKFW)</RemoveExistingProducts>
+ <Custom Action="RenameKrb5Ini_Cmd" Before="RenameKrb5Ini"/>
+ <Custom Action="RenameKrb5Ini" Before="InstallFinalize">SYSTEMKRB5INI <> ""</Custom>
<!-- When running with a UI, CCP_Success property is not passed down to the server. -->
<Custom Action="AbortNoIE" Before="RemoveNsisInstallation">UILevel = 0 And (Not Installed) And (CCP_Success <> 1)</Custom>
<Custom Action="RemoveNsisInstallation" Before="AbortCantRemoveNSIS">UPGRADENSIS <> "" And UILevel >= 4</Custom>