MSFN Forum: Variables and unattend txt file with batch files - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Variables and unattend txt file with batch files writing variables to unattend.txt with batch Rate Topic: -----

#1 User is offline   jtlittl 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 10-November 04

Posted 30 June 2009 - 02:26 PM

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.


#2 User is offline   leen2 

  • Member
  • Group: Members
  • Posts: 44
  • Joined: 17-June 08
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 30 June 2009 - 02:34 PM

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.

#3 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,106
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 30 June 2009 - 05:34 PM

Wouldn't Fedit do?

Check these:
http://www.msfn.org/...showtopic=51337
http://www.msfn.org/...showtopic=48200

jaclaz

#4 User is offline   jtlittl 

  • Newbie
  • Group: Members
  • Posts: 15
  • Joined: 10-November 04

Posted 30 June 2009 - 05:54 PM

Awsome thanks i am deff going to check out Fedit, but before you posted I just ran accross this one works really slick to.

http://www.safe-inst...eplace-exe.html

#5 User is online   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,106
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 30 June 2009 - 06:01 PM

Well, for a "general search and replace" tool the "reference app" should be gsar ;)
http://home.online.no/~tjaberg/
(as opposed to "line oriented" tools like Fedit)

jaclaz

This post has been edited by jaclaz: 30 June 2009 - 06:02 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy