Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting registry key and SETing the string

Status
Not open for further replies.

Roeee

IS-IT--Management
Joined
Jul 31, 2002
Messages
110
Location
GB
Apologies if this is the wrong forum for the type of request.

I am attempting to export a registry string (REGEDIT /e or REG QUERY >logfilename.txt) to a text file and would like to specify the result as a SET variable. The problem is that the output text file has several lines of text rather than the required string (as such I can not select SET = field3 for example).

Is there any command I can use to output only the specified string? If not, is there a quick way I can select a registry string and SET as a variable for use within a batch file?

Thanks
 
There is no command that I am aware of that will simply export the value. In your position, I think I would write a VBScript to do whatever it is that you need done. There is a very active VBScriot forum here where you can get help:
forum329

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Thanks for the reply.

However, I have no experience with VB and am limited to the desktop "scripting" side of things.
 
VBScript is desktop scripting. It would probably be well worth your effort to learn.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top