You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(This only concerns the new MSI installer for Windows.)
When setting CARGO_HOME as a process-local environment variable for msiexec, it will not be visible. I couldn't find any documentation about this behavior, but I tried and couldn't get it to work. Setting it at the user-level works, though. The question is: Is CARGO_HOME only used for setting a mock path for testing, or is there any other use case? There is a better way in MSI to modify the desired install location, namely setting the TARGETDIR property from the command-line for msiexec.
When we continue to use CARGO_HOME to set the installation directory, we would have to somehow ensure that its value is the same when uninstalling, or save the path in the registry that was used for installing.
Some of this also applies to RUSTUP_HOME, but in general the situation is less critical here. Whenever the directory specified in RUSTUP_HOME does not exist, rustup will just create a new directory and use that one.
The text was updated successfully, but these errors were encountered:
I found a way to read CARGO_HOME even if it is set as process-local environment variable. It needs to happen early in the installer, because later steps are run from the MSI service server in a new process, which impersonates the user but is not actually a child process so it can't see these environment variables. See also https://blogs.msdn.microsoft.com/heaths/2007/07/12/immediate-custom-actions-always-impersonate/.
We still need to make sure that nothing goes wrong if CARGO_HOME has different values at install time and uninstall time.
I'm going to store the installation directory in the registry. This is probably required anyway. So we will ignore the value of CARGO_HOME on uninstall. We should probably also ignore it on upgrade and use the path from the registry there as well.
(This only concerns the new MSI installer for Windows.)
When setting
CARGO_HOME
as a process-local environment variable formsiexec
, it will not be visible. I couldn't find any documentation about this behavior, but I tried and couldn't get it to work. Setting it at the user-level works, though. The question is: IsCARGO_HOME
only used for setting a mock path for testing, or is there any other use case? There is a better way in MSI to modify the desired install location, namely setting theTARGETDIR
property from the command-line for msiexec.When we continue to use
CARGO_HOME
to set the installation directory, we would have to somehow ensure that its value is the same when uninstalling, or save the path in the registry that was used for installing.Some of this also applies to
RUSTUP_HOME
, but in general the situation is less critical here. Whenever the directory specified inRUSTUP_HOME
does not exist,rustup
will just create a new directory and use that one.The text was updated successfully, but these errors were encountered: