@echo off
chcp 65001 >nul
set "CHROME="
if exist "%LocalAppData%\Google\Chrome\Application\chrome.exe" set "CHROME=%LocalAppData%\Google\Chrome\Application\chrome.exe"
if exist "%ProgramFiles%\Google\Chrome\Application\chrome.exe" set "CHROME=%ProgramFiles%\Google\Chrome\Application\chrome.exe"
if exist "%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" set "CHROME=%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"
if not defined CHROME (
  echo Chrome ne najden. Ustanovite Google Chrome i zapustite etot fail snova.
  start https://nonstop-chat.ru/
  pause
  exit /b 1
)
powershell -NoProfile -ExecutionPolicy Bypass -Command "$c=$env:CHROME; $d=[Environment]::GetFolderPath('Desktop'); $p=Join-Path $d 'NON-STOP.lnk'; $s=(New-Object -ComObject WScript.Shell).CreateShortcut($p); $s.TargetPath=$c; $s.Arguments='--app=https://nonstop-chat.ru/'; $s.WorkingDirectory=$env:USERPROFILE; $s.IconLocation=$c+',0'; $s.Save(); Start-Process -FilePath $c -ArgumentList '--app=https://nonstop-chat.ru/'"
