jeudi 29 octobre 2020

Multiple commands in a IF statement

Can you put multiple commands in a If command? What I have is looking to see if something is installed and if it is, send text to a file and change a variable. My example is lets say you want to see if edge is installed....

Set Edge=N
If  exist "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"  (
 echo Edge is installed >> C:\Temp\Message.txt
) Else (
echo Edge is Not installed >> C:\Temp\Message.txt
)

Where would I need to put the Set Edge=Y if it is installed?

Aucun commentaire:

Enregistrer un commentaire