There is a variable that contains the path of the file with the parameter, you need to remove the parameter, there was an attempt in For to use delims, but it excludes not the word itself, but the specified letters. In Js there is a split command, what to use in bat cases? There is such code:
@echo off For /F "UseBackQ Tokens=3*" %%I In (`Reg Query "HKEY_USERS\.DEFAULT\Software\Classes\steam\Shell\Open\Command"^|Find /I "steam.exe"`) Do set steam=%%J echo %steam% pause In the meaning of steam, besides the path itself, there remains "% 1", how to get rid of it? 