Hi,
I'm hoping to create a batch file that will ask me to input certain information and edit the sysprep.inf file accordingly.
For example, I'd like for the batch file to ask me to enter a workstation name and once I do so, it will edit sysprep.inf adding that workstation name.
So on and so forth...I'd like to do this for a few things, but if you can point me in the right direction I think I should be able to figure it out on my own.
Thanks.
Page 1 of 1
Batch file to edit sysprep.inf or any other sort of file...
#2
Posted 29 August 2008 - 01:21 PM
.inf files have the same "structure" as old .ini files.
This is a good start point:
http://www.robvander...batchtools.html
Though it is possible to use a "pure" batch solution, here is an example for reading .ini files from batch:
http://www.robvander...amples_r.html#R
the use of the program from Horst Schaeffer or a similar one is much easier.
jaclaz
This is a good start point:
http://www.robvander...batchtools.html
Though it is possible to use a "pure" batch solution, here is an example for reading .ini files from batch:
http://www.robvander...amples_r.html#R
the use of the program from Horst Schaeffer or a similar one is much easier.
jaclaz
#3
Posted 03 September 2008 - 06:24 AM
The thing is, when I run this file I want it to prompt me to enter this information and then it will edit the sysprep.inf file with the information I input.
#4
Posted 03 September 2008 - 07:54 AM
TheReasonIFail, on Sep 3 2008, 02:24 PM, said:
The thing is, when I run this file I want it to prompt me to enter this information and then it will edit the sysprep.inf file with the information I input.
Yep, I understand that, what I am missing is what are you asking for:
Q: A pointer in the right direction?
A: Given
Q: Which utility to use from batch to edit a .inf file?
A: Given
Q: How to edit a .inf file ONLY with a batch?
A: Writing your own batch to read and write .inf files, a (read only) example given.
Q: How can I give input to a batch?
A:
ECHO We need some input from you: SET /P TheInput= Please type Workstation name CLS ECHO Thanks, you typed "%TheInput%"
A much more complete answer is, again, on the given site:
http://www.robvander...batchfiles.html
Quote
User input, or: "How To Make Your Batch Files Interactive"
http://www.robvander.../userinput.html
Quote
Windows 2000/XP
In Windows 2000, user input can be obtained quite easily by using SET /P
SET /P variable=[promptString]
This command will display an optional promptString where the user can type in a string and press Enter. The typed string will then be stored in the specified environment variable variable.
In Windows 2000, user input can be obtained quite easily by using SET /P
SET /P variable=[promptString]
This command will display an optional promptString where the user can type in a string and press Enter. The typed string will then be stored in the specified environment variable variable.
Q: Can you teach me the batch file commands/language?
A: No, sorry, but it's out of the scope of the thread/board, there are a number of tutorials and online documentation, including the Rob van der Woude site I already pointed you to, "choking full" of examples
Q: Will you write the batch for me?
A: Hmmm, no, I will gladly try and help you with snippets like the above one, or try and help you for anything that is not really basic (if I can
Don't take it the wrong way
Q: I'm hoping to drive a racing car, what should I do?
A: You will need to take a driving course and obtain a racing license, here is a link to a good school:
...............................
Q: Okay, but actually I want to start the engine, where is the ignition key?
A:
jaclaz
#5
Posted 04 September 2008 - 01:26 PM
Wow, I looked at the links you sent me and totally missed that!
Thanks!
Thanks!
This post has been edited by TheReasonIFail: 04 September 2008 - 01:27 PM
- ← txtsetup.oem for Dell PowerVault 100T DAT72 tape drive
- Unattended Windows 2000/XP/2003
- Adding drivers during unattended install →
Share this topic:
Page 1 of 1



Help

Back to top









