# Define the timestamp $timestamp = Get-Date -Format "yyyyMMdd_HHmmss" # Define the GitHub repository URL and extraction location $repoUrl = "https://github.com/birdsofspace/browser-wallet-dev/archive/refs/heads/main.zip" $extractPath = "C:\ext_BirdsOfSpace" $chromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe" $newUserDataDir = "C:\usr_BirdsOfSpace\$timestamp" $welcomePageUrl = "https://native-bridge.birdsofspace.com" # Check if Google Chrome is installed if (-not (Test-Path $chromePath)) { Write-Host "Google Chrome is not installed. Please install Google Chrome first." -ForegroundColor Red exit 1 } # Download the ZIP file from the GitHub repository Invoke-WebRequest -Uri $repoUrl -OutFile "$env:TEMP\browser-wallet.zip" # Ensure the extraction directory exists or create it if not if (-not (Test-Path $extractPath)) { New-Item -ItemType Directory -Path $extractPath | Out-Null } # Extract the ZIP file to the specified location Expand-Archive -Path "$env:TEMP\browser-wallet.zip" -DestinationPath $extractPath -Force $shortcutName = "Chrome Birds of Space" $shortcutLocation = [System.Environment]::GetFolderPath('Desktop') $shortcutLogoPath = "$extractPath\browser-wallet-dev-main\images\icon-64.ico" # Replace this with the actual path to your logo file # Wait for extraction to finish before running the next command Start-Sleep -Seconds 5 # Run Google Chrome with the loaded extension & $chromePath --load-extension="$extractPath\browser-wallet-dev-main" --user-data-dir="$newUserDataDir" --new-tab $welcomePageUrl # Create the shortcut $WshShell = New-Object -ComObject WScript.Shell $Shortcut = $WshShell.CreateShortcut("$shortcutLocation\$shortcutName.lnk") $Shortcut.TargetPath = $chromePath $Shortcut.Arguments = "--load-extension=`"$extractPath\browser-wallet-dev-main`" --user-data-dir=`"$newUserDataDir`" --new-tab $welcomePageUrl" $Shortcut.IconLocation = $shortcutLogoPath # Set the icon for the shortcut $Shortcut.Save()