-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_shortcuts.ps1
More file actions
41 lines (36 loc) · 1.67 KB
/
Copy pathmake_shortcuts.ps1
File metadata and controls
41 lines (36 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$WshShell = New-Object -ComObject WScript.Shell
# Get current directory
$ProjectDir = (Get-Location).Path
$IconPath = Join-Path $ProjectDir "hotmic.ico"
$AltIconPath = Join-Path $ProjectDir "hotmic_alt.ico"
# Desktop shortcut 1 (with console)
$DesktopPath = [Environment]::GetFolderPath("Desktop")
$ShortcutPath1 = Join-Path $DesktopPath "HotMic.lnk"
$Shortcut1 = $WshShell.CreateShortcut($ShortcutPath1)
$Shortcut1.TargetPath = Join-Path $ProjectDir "launch_hotmic.bat"
$Shortcut1.WorkingDirectory = $ProjectDir
$Shortcut1.Description = "HotMic Speech-to-Text"
$Shortcut1.IconLocation = $IconPath
$Shortcut1.Save()
Write-Host "Created: $ShortcutPath1" -ForegroundColor Green
# Desktop shortcut 2 (background)
$ShortcutPath2 = Join-Path $DesktopPath "HotMic (Background).lnk"
$Shortcut2 = $WshShell.CreateShortcut($ShortcutPath2)
$Shortcut2.TargetPath = Join-Path $ProjectDir "launch_hotmic_hidden.vbs"
$Shortcut2.WorkingDirectory = $ProjectDir
$Shortcut2.Description = "HotMic Speech-to-Text (Background)"
$Shortcut2.IconLocation = $AltIconPath
$Shortcut2.Save()
Write-Host "Created: $ShortcutPath2" -ForegroundColor Green
# Start menu shortcut
$StartMenuPath = Join-Path $env:APPDATA "Microsoft\Windows\Start Menu\Programs"
$ShortcutPath3 = Join-Path $StartMenuPath "HotMic.lnk"
$Shortcut3 = $WshShell.CreateShortcut($ShortcutPath3)
$Shortcut3.TargetPath = Join-Path $ProjectDir "launch_hotmic.bat"
$Shortcut3.WorkingDirectory = $ProjectDir
$Shortcut3.Description = "HotMic Speech-to-Text"
$Shortcut3.IconLocation = $IconPath
$Shortcut3.Save()
Write-Host "Created: $ShortcutPath3" -ForegroundColor Green
Write-Host ""
Write-Host "Shortcuts created successfully with custom icons!" -ForegroundColor Green