Jump to content

Variables and unattend txt file with batch files


jtlittl

Recommended Posts

I upgraded my installs to run from winPE (loving it tons easier) but I have ran into one issue.

I have a batch file that kicks off under winpe and it asks some questions to get the network connection and some diffrent install options (Like computer name and time zones).

Before winpe I could use setini.exe to pipe in variables to the unattend.txt file for the timezone and machine name and then kick of the installation using the file.

But the setini.exe will not run in winbe anyone know of another tool that will run under winpe that will write lines to a txt file under a section or header in the file so i can add the timezone under the GuiUnattended section and the machine name under the UserData section?

Thanks.

yeah i could have the bat file create the whole file but why I only need to add these 2 variables to a pre built file.

Link to comment
Share on other sites


use vbscript to read the file into a variable, then search and replace the text you need within the variable and write out the variable as a text file again.

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...