Question How to fix“ ERROR-invalid argument/option - 'Live' ” in this code?

Jul 21, 2019
1
0
10
0
So I want to close my live wallpaper when epic games launcher starts and then start it when i close the launcher and with other programs it worked fine but now it gives me this error message:ERROR: Invalid argument/option - 'Live'.

I think this is because the live wallpaper has spaces in its name, but I tried quotation marks and it still doesn't work. Do you know what I should do?

@Echo off
:TEST
tasklist /nh /fi "imagename eq EpicGamesLauncher.exe" | find /i "EpicGamesLauncher.exe" >nul
if "%ERRORLEVEL%"=="1" goto TIMER
taskkill /im "DesktopHut Live v5.0.0.exe" /t /f
:TIMER
timeout /T 10
goto TEST2

:TEST2
tasklist /FI "IMAGENAME eq EpicGamesLauncher.exe" 2>NUL | find /I /N "EpicGamesLauncher.exe">NUL
if "%ERRORLEVEL%"=="0" goto TEST
tasklist /nh /fi "imagename eq "DesktopHut Live v5.0.0.exe" "| find /i /n "DesktopHut Live v5.0.0.exe" >nul
if "%ERRORLEVEL%"=="0" goto TEST
start " " "C:\Users\David\Desktop\DesktopHut Live v5.0.0.exe"
goto TEST

pause>nul
 
Thread starter Similar threads Forum Replies Date
kikani.kautik Apps General Discussion 2
I Apps General Discussion 5
G Apps General Discussion 1
V Apps General Discussion 2
S Apps General Discussion 2
D Apps General Discussion 8
megashark Apps General Discussion 2
D Apps General Discussion 6
kolawale Apps General Discussion 0
A Apps General Discussion 1
B Apps General Discussion 30
jbrown156 Apps General Discussion 0
S Apps General Discussion 2
Curiousaboutpc Apps General Discussion 0
J Apps General Discussion 1
T Apps General Discussion 17
D Apps General Discussion 1
K Apps General Discussion 7
G Apps General Discussion 7
C Apps General Discussion 1

ASK THE COMMUNITY