Is it possible to make an if statement for batch based off a user opening a file?
I tried this:
color c
echo off
cls
:props
if open WINWORD.exe (echo a & pause 10 & exit)
goto props
Doing so will simply post the error 'WINWORD was unexpected at this time.' and kill the command prompt.
What I am trying to achieve is a batch file that will:
- Look if anyone is opening WINWORD.exe
- Once somebody has opened the file the command prompt will display 'a'
- Exit the command prompt after 10 seconds once 'a' was displayed.
Aucun commentaire:
Enregistrer un commentaire