Let user choose installation directory?

Hi, it would be nice to be able to choose the installation directory when installing insync. In my setup I have both a local and a roaming profile. The problem is that by default Insync selects the roaming profile, but I would like it to install in the local profile (because Insync doesn’t work with the roaming profile). I also tried to create a shell script to make the installer choose the local profile, but unfortunately that doesn’t work.

# Step 1: Temporarily set the execution policy to Bypass for the current session
# This allows the script to run even if the system has restricted script execution
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force

# Step 2: Store the original %APPDATA% path using the $env: syntax
$originalAppData = $env:APPDATA
$localAppData = $env:LOCALAPPDATA

# Confirm paths (for debugging purposes)
Write-Output "Original APPDATA path: $originalAppData"
Write-Output "Local APPDATA path: $localAppData"

# Step 3: Temporarily set %APPDATA% to %LOCALAPPDATA% to ensure the installer writes to a local-only path
$env:APPDATA = $localAppData

# Confirm the temporary change (for debugging purposes)
Write-Output "APPDATA temporarily set to LOCALAPPDATA path: $env:APPDATA"

# Step 4: Run the installer (replace 'path_to_installer' with the actual path to your installer)
# Example: Start-Process -FilePath "C:\Users\johannes.wiesner\Insync-3.8.7.50505.exe" -ArgumentList "/S" for a silent install
$installerPath = "C:\Users\johannes.wiesner\Downloads\Insync-3.8.7.50505.exe"
if (Test-Path $installerPath) {
    Start-Process -FilePath $installerPath -Wait
} else {
    Write-Output "Installer not found at path: $installerPath"
}

# Step 5: Restore the original %APPDATA% path after installation
$env:APPDATA = $originalAppData

# Confirm restoration (for debugging purposes)
Write-Output "APPDATA restored to original path: $env:APPDATA"

# Step 6: Optionally revert the execution policy if changed permanently earlier
# Since we used -Scope Process, the change will automatically revert when the session ends
# However, if you want to reset it within the script, uncomment the next line
# Set-ExecutionPolicy -ExecutionPolicy Restricted -Scope CurrentUser -Force

Write-Output "Script completed."
1 Like

Thank you for sharing this feedback, @JohannesWiesner!

Let me ask our engineers regarding this default behavior. I’ll also add your vote to this feature request.