Search : in
By :

Batch file - load things from a config file

MelonBag, on Mar 28, 2009 8:50:35 am GMT 
 Report this message to moderators

Hello, I've created a batch program that needs to load a string from a config file.
The config file contains several lines but I want one of them loaded into a variable in the batch file. I considered using a vbscript to load the file, find the line, and output it, but I doesn't know how to do it in vbscript.

Let's say that I want to output this: {4d36e96c-e325-11ce-bfc1-08002be10318} from a file that contains this:

[Version]
Signature="$Windows NT$"
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%MS%
LayoutFile=layout.inf
DriverVer=06/06/2001,5.01.2001

I don't know how to do.

Any help will be deeply appreciated!

Configuration: Windows XP
Internet Explorer 7.0

Best answers for « Batch file load things from a config file » in :
Batch file Show Batch file Settings File Creation DOS is integrated in windows which allow to exploit functionality and command sequence in a script. A batch file is a text file which contains command to be read by DOS. This file can be launched...
Batch file – Get Filenames & Timestamps Show Batch file – Get Filenames & Timestamps Issue Solution Note Issue Can anyone help me create a batch file that will display all the files, subfolders and files under subfolders of folder with both date created and date modified then...
What is a batch file? ShowWhat is a batch file? Creating a batch file Prerequisites Create file Windows comes with a version of DOS, which allows you,exploiting the features and the sequence of commands in a script. Batch file, is a simple text file (ascii)...
[Batch File]Time based actions Show[Batch File]Time based actions Issue Solution Issue Upon creating a batch file you want that certain line of batch file is executed after every second (not all the program only certain line). In VB we can do it using the Timer...
Writing in batch in text file ShowWriting in batch in text file To write in a file text, you just have to use a redirect: echo text > output_file.txt To write in an existing file: echo " Write at the end of the file ">> output_file.txt
Operating Systems - Customising DOS ShowThe DOS start-up procedure is defined in the autoexec.bat and config.sys files located in the root of your "C:\" drive. We highly recommend making back up copies of these files before modifying them. To deactivate a line of command in either file...
Linux - User management ShowFirst step for the administrator When several people have access to a system, the administrator must manage the users. To do so, he must know the common commands and files to be configured. The important files are: the /etc/passwd file the...