Skip to content

Instantly share code, notes, and snippets.

@VirtusB
Created November 26, 2025 10:49
Show Gist options
  • Select an option

  • Save VirtusB/2cb60a7582dc9d12ea5ba6167a7bfc1f to your computer and use it in GitHub Desktop.

Select an option

Save VirtusB/2cb60a7582dc9d12ea5ba6167a7bfc1f to your computer and use it in GitHub Desktop.
Start ZeeDrive from PowerShell. Run: powershell.exe -ExecutionPolicy Bypass -File .\Remap-ZeeDrive.ps1
# Remap-ZeeDrive.ps1
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run'
$valueName = 'Thinkscape.ZeeDrive.1'
try {
$props = Get-ItemProperty -Path $regPath -Name $valueName -ErrorAction Stop
$cmdLine = $props.$valueName
} catch {
Write-Host "[ZeeDrive] Startup command not found."
Write-Host " Registry path : $regPath"
Write-Host " Value name : $valueName"
exit 1
}
if ([string]::IsNullOrWhiteSpace($cmdLine)) {
Write-Host "[ZeeDrive] Registry value is empty."
exit 1
}
# Parse: handle either "C:\Path\Exe.exe" args... or C:\Path\Exe.exe args...
$exePath = $null
$args = $null
if ($cmdLine -match '^\s*"([^"]+)"\s*(.*)$') {
# Quoted path
$exePath = $matches[1]
$args = $matches[2]
}
elseif ($cmdLine -match '^\s*(\S+)\s*(.*)$') {
# Unquoted path
$exePath = $matches[1]
$args = $matches[2]
}
if (-not (Test-Path $exePath)) {
Write-Host "[ZeeDrive] EXE not found:"
Write-Host " $exePath"
Write-Host "Original command line from registry:"
Write-Host " $cmdLine"
exit 1
}
Write-Host "[ZeeDrive] Executing startup command:"
Write-Host " $exePath $args"
Write-Host
# Run it the same way Windows would at logon
Start-Process -FilePath $exePath -ArgumentList $args
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment