@echo off

REM ExecutionPolicy of powershell.exe
set EXPOLICY=Bypass

call set_path.bat

REM start /WAIT .\nircmd.exe win close ititle "tclsh.exe"
REM timeout /t 1 /nobreak >nul
taskkill /F /im tclsh.exe >nul 2>&1
call :ps1_sleep 1
start tclsh.exe iscserv.tcl %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Stellarium 8091

exit


REM ################################################################
REM The timeout command seems unstable.
REM Use the powershell sleep command instead.

:ps1_sleep

powershell.exe -NoLogo -ExecutionPolicy %EXPOLICY% sleep %1

exit /b

