Files
riojoy/deploy/make-shortcut.vbs
T
CydandClaude Fable 5 2ecb617c09 Phase 8D: universal deployment package (XP + Win10/11, two entry points)
One RIOJoy-<ver>.zip now deploys on both OS generations (~75 MB with the
offline XP prerequisites):
- Layout: RIOJoy\app (net48 x64) + RIOJoy\app-xp (net40 x86) +
  RIOJoy\vendor (ViGEmBus; vendor\xp: .NET 4.0 offline installer +
  KB2468871, both signature-verified; RioGamepadXP driver slots in when
  8B lands - build warns/skips until then).
- RIOJoy\install-core.bat: shared OS-detecting install logic (ver ->
  5.1 = XP); pure cmd.exe on the XP path, delegates to install-rio.ps1
  on 10/11. Exports RIOJOY_APPDIR for shortcut creation.
- postinstall.bat (TeslaConsole, unattended): elevates, runs the core,
  then deletes install.bat + README.txt so C:\games stays clean.
- install.bat (standalone computers): same core + Start Menu/desktop
  shortcuts via make-shortcut.vbs (XP-safe); keeps the README.
- README.txt at the zip root explains which entry point to run.
- deploy *.ps1 re-encoded UTF-8-with-BOM: Windows PowerShell read the
  BOM-less files as ANSI, where an em-dash byte parses as a curly quote
  and breaks string parsing (bit install-rio.ps1 in dry-run testing).

Verified: zip layout correct; extracted package dispatch-tested on
Win10 non-elevated (OS detect -> modern route -> admin guard, system
untouched).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 20:53:43 -05:00

28 lines
1.0 KiB
Plaintext

' make-shortcut.vbs <targetExe> <name> <workingDir>
' Creates Start Menu (all users) and desktop shortcuts. VBScript so the same
' helper works on Windows XP (no PowerShell) and Windows 10/11.
Option Explicit
Dim shell, fso, target, name, workdir, places, place, lnk
If WScript.Arguments.Count < 3 Then
WScript.Echo "usage: make-shortcut.vbs <targetExe> <name> <workingDir>"
WScript.Quit 1
End If
target = WScript.Arguments(0)
name = WScript.Arguments(1)
workdir = WScript.Arguments(2)
Set shell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
places = Array(shell.SpecialFolders("AllUsersPrograms"), shell.SpecialFolders("Desktop"))
For Each place In places
If fso.FolderExists(place) Then
Set lnk = shell.CreateShortcut(fso.BuildPath(place, name & ".lnk"))
lnk.TargetPath = target
lnk.WorkingDirectory = workdir
lnk.Description = "RIOJoy cockpit interface"
lnk.Save
WScript.Echo " shortcut: " & fso.BuildPath(place, name & ".lnk")
End If
Next