Batch script not working with ink shortcut in filepath

Viewed 26

I cannot get this to work and I have a suspicion it has to with the .ink extension. If I just change the code to a .txt extension it works. It's like it can't handle the shortcut file. Any ideas?

if exist "C:\apps\teams_windows_x64.exe" (
 start "teams" "C:\apps\teams_windows_x64.exe"
)
if exist "C:\teams_windows_x64.exe" (
start "teams" "C:\teams_windows_x64.exe"
) 
:check
TIMEOUT /T 10 /NOBREAK
if exist "%userprofile%\desktop\Microsoft Teams.ink" (
TIMEOUT /T 45 /NOBREAK
shutdown -s
exit
)
goto check
0 Answers
Related