I have the following batch file:
for /f "delims=" %%x in (path.txt) do set path=%%x
set address=62.75.218.30:14567
start bf1942.exe
With path.txt
file containing the path to the executable. Once I run the batch file I am prompted if I want to allow BF1942.exe to make changes to this computer (user account control). Once I select 'yes' nothing happens. Similarly when I launch BF1942.exe by double clicking on the icon I get the same prompt but the game launches after I give permission.
Edit: I did some investigation. When I moved the path.txt and the batch file into my Bf1942 folder and ran the batch file this worked. So the problem has something to do where the file is located.
Change the working directory (do not change the system environment variable
path
) as follows:or
Resources (required reading):
%~x
etc. special page) Command Line arguments (Parameters)