Need to launch BIOS update files
Moderator: DosItHelp
Re: Need to launch BIOS update files
using windows 7 professional.
my batch file is this one:
@echo off
set "pa=
set /p "pa=PA Number:
if defined pa
for /f "tokens=1,* delims=|" %%a in (file.txt) do (
if /i "%%a"=="%pa%" echo "%%b"
))
pause
copy and paste just like you gave to me.
And the txt file is:
PSAT2|f:\BIOStosh\psat2\Pflash.exe
is there another way? maybe put in the batch file the map of the models without using a .txt file?
my batch file is this one:
@echo off
set "pa=
set /p "pa=PA Number:
if defined pa
for /f "tokens=1,* delims=|" %%a in (file.txt) do (
if /i "%%a"=="%pa%" echo "%%b"
))
pause
copy and paste just like you gave to me.
And the txt file is:
PSAT2|f:\BIOStosh\psat2\Pflash.exe
is there another way? maybe put in the batch file the map of the models without using a .txt file?
Re: Need to launch BIOS update files
rfdr81 wrote:my batch file is this one:
@echo off
set "pa=
set /p "pa=PA Number:
if defined pa
for /f "tokens=1,* delims=|" %%a in (file.txt) do (
if /i "%%a"=="%pa%" echo "%%b"
))
pause
copy and paste just like you gave to me.
You have errors in the batch file. It's not copy and pasted properly.
Re: Need to launch BIOS update files
@echo off
set "pa="
set /p "pa=PA Number: "
if defined pa (
for /f "tokens=1,* delims=|" %%a in (file.txt) do (
if /i "%%a"=="%pa%" "%%b"
))
this is waht you post yesterday..copy and paste here and paste in the batch on the usb. Give the same error...
set "pa="
set /p "pa=PA Number: "
if defined pa (
for /f "tokens=1,* delims=|" %%a in (file.txt) do (
if /i "%%a"=="%pa%" "%%b"
))
this is waht you post yesterday..copy and paste here and paste in the batch on the usb. Give the same error...
Re: Need to launch BIOS update files
No, it gives no error if you have the file in that location.
If the file does not exist then this is what you see which is telling you that the file doesn't exist.
PA Number: PSAT2
'"f:\biostosh\psat2\Pflash.exe"' is not recognized as an internal or external command,
operable program or batch file.
If the file does not exist then this is what you see which is telling you that the file doesn't exist.
PA Number: PSAT2
'"f:\biostosh\psat2\Pflash.exe"' is not recognized as an internal or external command,
operable program or batch file.
Re: Need to launch BIOS update files
ok, maybe the problem is from me, but this is your batch file( copy and paste just like you postes yesterday without any alteration)
@echo off
set "pa="
set /p "pa=PA Number: "
if defined pa (
for /f "tokens=1,* delims=|" %%a in (file.txt) do (
if /i "%%a"=="%pa%" "%%b"
))
this is the file.txt:
PSAT2|f:\biostosh\psat2\Pflash.exe
the update file is pflash.exe, is on f:\biostosh\psat2
put to test on the QUEMU emulator, gives the error tha i told you before.
@echo off
set "pa="
set /p "pa=PA Number: "
if defined pa (
for /f "tokens=1,* delims=|" %%a in (file.txt) do (
if /i "%%a"=="%pa%" "%%b"
))
this is the file.txt:
PSAT2|f:\biostosh\psat2\Pflash.exe
the update file is pflash.exe, is on f:\biostosh\psat2
put to test on the QUEMU emulator, gives the error tha i told you before.
Re: Need to launch BIOS update files
copy this last line but give the same error: syntax error, bad variable..
Re: Need to launch BIOS update files
I have an other idea. Put the file.txt and the batch in the same folder and try this:
Code: Select all
@echo off
set "pa="
set /p "pa=PA Number: "
if defined pa (
for /f "usebackq tokens=1,* delims=|" %%a in ("%~dp0file.txt") do (
if /i "%%a"=="%pa%" "%%b"
))
Re: Need to launch BIOS update files
don´t konow why doesnt work... The line PA number appears correctly, i put the model(psat2) enter, then gives error:
Syntax error.
bad variable specification
bad comand or file name - "))"
Syntax error.
bad variable specification
bad comand or file name - "))"
Re: Need to launch BIOS update files
try to do in other way...it is possible something like this, a batch file?
@echo off
rem *** jump to model according to PA number ***
goto %cPAshort%
LL2E
SAT2
here create a folder were the file to update is and run it...
When we put the correct string on the top he goes to correct folder and run it...it is possible?
@echo off
rem *** jump to model according to PA number ***
goto %cPAshort%
LL2E
SAT2
here create a folder were the file to update is and run it...
When we put the correct string on the top he goes to correct folder and run it...it is possible?
Re: Need to launch BIOS update files
Try to remove the double quotes around %%b:
Code: Select all
@echo off
set "pa="
set /p "pa=PA Number: "
if defined pa (
for /f "usebackq tokens=1,* delims=|" %%a in ("%~dp0file.txt") do (
if /i "%%a"=="%pa%" %%b
))
Re: Need to launch BIOS update files
Ok, works fine now made by this form!
Thakns all for the help.
Thakns all for the help.
Re: Need to launch BIOS update files
Did you make it with goto: ?
Question to confirm choice
It is possible after put the model that we want, appear a question to confirm the choice and put yes or no to confirm?