@echo off setlocal EnableDelayedExpansion title Installing UVision Inventory Management Desktop App... set "APP_URL=http://localhost/uvision-saas/uvision/index.html" set "ICON_URL=http://localhost/uvision-saas/uvision/uvision_logo.ico" set "APP_FOLDER=%APPDATA%\uvision_inventory" set "ICON_PATH=%APP_FOLDER%\uvision_logo.ico" set "SHORTCUT_NAME=UVision Inventory Management.lnk" if not exist "%APP_FOLDER%" mkdir "%APP_FOLDER%" >nul 2>nul echo ====================================================================== echo Installing UVision Inventory Management (Frameless Desktop App)... echo ====================================================================== echo. powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='SilentlyContinue'; Invoke-WebRequest -Uri $env:ICON_URL -OutFile $env:ICON_PATH -UseBasicParsing; $desktop=[Environment]::GetFolderPath('Desktop'); $shortcutPath=Join-Path $desktop $env:SHORTCUT_NAME; $browser=''; $edgePaths=@(\"${env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe\", \"$env:ProgramFiles\Microsoft\Edge\Application\msedge.exe\", \"$env:LocalAppData\Microsoft\Edge\Application\msedge.exe\"); $chromePaths=@(\"$env:ProgramFiles\Google\Chrome\Application\chrome.exe\", \"${env:ProgramFiles(x86)}\Google\Chrome\Application\chrome.exe\", \"$env:LocalAppData\Google\Chrome\Application\chrome.exe\"); foreach($p in $edgePaths){ if(Test-Path $p){ $browser=$p; break; } } if(-not $browser){ foreach($p in $chromePaths){ if(Test-Path $p){ $browser=$p; break; } } } $ws=New-Object -ComObject WScript.Shell; $sc=$ws.CreateShortcut($shortcutPath); if($browser){ $sc.TargetPath=$browser; $sc.Arguments=\"--app=\"\"$env:APP_URL\"\" --start-maximized\"; } else { $sc.TargetPath=$env:APP_URL; } $sc.IconLocation=$env:ICON_PATH; $sc.Description='UVision Inventory Management - Frameless Standalone App'; $sc.WorkingDirectory=$env:APP_FOLDER; $sc.Save(); if($browser){ Start-Process -FilePath $browser -ArgumentList \"--app=\"\"$env:APP_URL\"\" --start-maximized\"; } else { Start-Process $env:APP_URL; }" echo. echo [OK] UVision Frameless Desktop App installed successfully! echo [OK] Desktop Shortcut created: %SHORTCUT_NAME% echo [OK] Launching application in standalone frameless mode... echo. timeout /t 2 >nul endlocal