
And is is posible to have something like this...
i just need return back of this command like is it done or thera is an Error like synatax or something ...
IF (START "" "C:\Windows\system32\Notepad.exe")=True Echo OK
thanks a lot

Moderator: DosItHelp
It doesn't work like that, the if command does STRING compare only, but you can use the '&&' and '||' operators aswell as errorLevel.icikato wrote:Hi can someone help me to work this out
And is is posible to have something like this...
i just need return back of this command like is it done or thera is an Error like synatax or something ...
IF (START "" "C:\Windows\system32\Notepad.exe")=True Echo OK
thanks a lot
Code: Select all
START "" "C:\Windows\system32\Notepad.exe" &&echo.succes ||echo.failed
Code: Select all
START "" "C:\Windows\system32\Notepad.exe"
if not errorLevel 1 (echo.succes)else echo.errorLevel %errorLevel%
Code: Select all
start notepad.exe
tasklist | findstr "notepad.exe" || if not errorlevel 1 echo OK