launch - Batch file does not follow through with launching program once given permission by the user account control -
i have following batch file:
for /f "delims=" %%x in (path.txt) set path=%%x set address=62.75.218.30:14567 start bf1942.exe
with path.txt
file containing path executable. once run batch file prompted if want allow bf1942.exe make changes computer (user account control). once select 'yes' nothing happens. when launch bf1942.exe double clicking on icon same prompt game launches after give permission.
edit: did investigation. when moved path.txt , batch file bf1942 folder , ran batch file worked. problem has file located.
change working directory (do not change system environment variable path
) follows:
for /f "delims=" %%x in (path.txt) set "mypath=%%~x" set "address=62.75.218.30:14567" pushd "%mypath%" start "" bf1942.exe
or
set "address=62.75.218.30:14567" /f "delims=" %%x in (path.txt) ( pushd "%%~x" start "" bf1942.exe )
resources (required reading):
- (command reference) an a-z index of windows cmd command line
- (additional particularities) windows cmd shell command line syntax
- (
%~x
etc. special page) command line arguments (parameters)
Comments
Post a Comment