Jump to content

This is making me nuts HELP!


Recommended Posts

I am trying to add a build version to my unattended build process;

I have a flat text file that only includes a number and I need to read the file and use the number

Buildno.txt

125

batch.bat

set Buildno=c:\Buildno.txt

echo Echo Line5 = "Internal XP Build Number: %Buildno%" >>%SystemRoot%\System32\OEMINFO.ini

I have tried 10-12 different things and haven't resolved it...

Please HELP!

Roger

Link to comment
Share on other sites


well, the problem is with your set command...you need to figure out a way to get it to use 125 instead of c:\buildno.txt...ill play with it a bit, but thats where the error exists.

do this instead...

for /f %%i in (c:\buildno.txt) do set buildno=%%i

Link to comment
Share on other sites

There you go, enjoy :rolleyes:

@echo off
for /f %%i in (Buildno.txt) do set BUILDNO=%%i
echo Line5 = Internal XP Build Number: %BUILDNO%
pause

edit: thread, look at the time, 3 minutes, i was writing it while you posted it :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...