I am trying to close an exe process located in a specific directory, using the %appdata% variable, but it doesn't work.
WMIC Process Where "ExecutablePath='%APPDATA%\\Adobe\\screenrecorder.exe'" Call Terminate
If I try to close the process without %appdata% it works as intended.
WMIC Process Where "ExecutablePath='C:\\Users\\Admin\\AppData\\Roaming\\Adobe\\screenrecorder.exe'" Call Terminate
It is essential that it must work using %appdata%, does someone know how to close an exe file using %appdata%?