Skip to content

Commit 523645a

Browse files
hlsitechioclaude
andcommitted
feat: install T3 Code to current directory instead of C:\Program Files
MSI now uses INSTALLDIR=$PWD so users control where it installs. cd to target folder first, then run the iex command. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e391bc9 commit 523645a

1 file changed

Lines changed: 19 additions & 10 deletions

File tree

install.ps1

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
winget or Chocolatey.
1010
1111
Run the same command for both install and update — it auto-detects.
12+
Installs T3 Code into the current directory (cd to your target first).
1213
1314
.EXAMPLE
14-
# Fresh install or update:
15-
iex (irm https://raw.githubusercontent.com/hlsitechio/t3code/main/install.ps1)
15+
# Install to a specific folder:
16+
cd G:\t3coder\t3code\release
17+
irm hlsitechio.github.io/t3code/install.ps1 | iex
18+
19+
.EXAMPLE
20+
# Install from anywhere (installs to current directory):
21+
irm hlsitechio.github.io/t3code/install.ps1 | iex
1622
#>
1723

1824
$ErrorActionPreference = "Stop"
@@ -293,9 +299,11 @@ try {
293299
}
294300
Invoke-WebRequest -Uri $msiUrl -OutFile $msiPath -UseBasicParsing
295301

296-
Write-Step "Installing T3 Code (admin prompt may appear)..."
297-
# MSI /i handles both install and upgrade automatically
298-
$proc = Start-Process msiexec.exe -ArgumentList "/i `"$msiPath`" /qb /norestart" -Wait -Verb RunAs -PassThru
302+
# Use current directory as install target, or fallback to Program Files
303+
$installDir = $PWD.Path
304+
Write-Step "Installing T3 Code to $installDir (admin prompt may appear)..."
305+
$msiArgs = "/i `"$msiPath`" /qb /norestart INSTALLDIR=`"$installDir`""
306+
$proc = Start-Process msiexec.exe -ArgumentList $msiArgs -Wait -Verb RunAs -PassThru
299307
if ($proc.ExitCode -eq 0) {
300308
if ($isUpdate) {
301309
Write-Ok "T3 Code updated to v$latestVersion!"
@@ -351,17 +359,18 @@ Write-Host " ========================================" -ForegroundColor Green
351359
Write-Host ""
352360

353361
if (-not $isUpdate) {
354-
Write-Host " Launch T3 Code from the Start Menu or Desktop shortcut." -ForegroundColor White
362+
Write-Host " Installed to: $($PWD.Path)" -ForegroundColor White
355363
Write-Host ""
356364
Write-Host " Quick start:" -ForegroundColor DarkGray
357-
Write-Host " 1. Sign in with your AI providers (ChatGPT, Claude, Gemini)" -ForegroundColor DarkGray
358-
Write-Host " 2. Connect your GitHub account" -ForegroundColor DarkGray
359-
Write-Host " 3. Start coding!" -ForegroundColor DarkGray
365+
Write-Host " 1. Launch T3 Code from the Start Menu or Desktop shortcut" -ForegroundColor DarkGray
366+
Write-Host " 2. Sign in with your AI providers (ChatGPT, Claude, Gemini)" -ForegroundColor DarkGray
367+
Write-Host " 3. Connect your GitHub account" -ForegroundColor DarkGray
368+
Write-Host " 4. Start coding!" -ForegroundColor DarkGray
360369
} else {
361370
Write-Host " Restart T3 Code to use the latest version." -ForegroundColor White
362371
}
363372

364373
Write-Host ""
365374
Write-Host " Run this command anytime to update:" -ForegroundColor DarkGray
366-
Write-Host " iex (irm https://raw.githubusercontent.com/$repo/main/install.ps1)" -ForegroundColor DarkGray
375+
Write-Host " irm hlsitechio.github.io/t3code/install.ps1 | iex" -ForegroundColor DarkGray
367376
Write-Host ""

0 commit comments

Comments
 (0)