[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Need help with a text parsing script

Asked by fusion_jeff in VB Script, Windows Batch Scripting

Tags: Script

ADMINS PLEAE NOTE THAT THIS IS FOR INTERNAL USE ONLY!!!! The company I work for has multiple sites and the different departments have different requests for the following information...

Ok, here's the deal, I have recently created a universal restore DVD using Acronis TIE. The image file is of a SYSPREP'ed Windows XP install. The original computer was registered with the Owner and Company name being the following: "Clone User" with "Clone Company". During the recovery process the Windows mini-wizard comes up and asks for the "new" Owner name and Organization. This data is confirmed to be stored in "HKLM\Software\Microsoft\Windows NT\CurrentVersion" under the values "RegisteredOwner" and "RegisteredOrganization" (See Code Snippet below shows an example REG EXPORT of that key).

Now for the fun part, I need to create a script that can be run to parse the values of RegisteredOwner and use the name contained there to replace all instances of data values = "Clone User" in the registry. Then do the same for RegisteredOrganization. So far I have created a .bat file that runs the command {REG EXPORT "HKLM\Software\Microsoft\Windows NT\CurrentVersion" new.reg} to generate a .reg file (plain text) with the contents looking like the code snippet. Then (manually) I created a .reg file called "clone.reg" containing all the keys showing Clone User and Clone Company. My origonal thought was to run the .bat file which creates the "new.reg" file containing the new info, the .bat file then executes a script file(part I need help with) that parses out the 2 values and basicly does a "Replace All" type function of the values in the "clone.reg" and save the file, then the .bat file would invoke a "REG IMPORT clone.reg" to merge the new data into the registry.

I have searched high and low on the net and nothing really goes into much detail about this kind of project. I might be over thinking the whole process here (is it possible to just run directly against the registry  itself with out having to import & export?), so if there is another way to script this then great. My only requirement is: it has to be automatic requiring no end-user input and must be executable from a command line.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
bla
bla
bla
"RegisteredOrganization"="New Company Name Here"
"RegisteredOwner"="New Owner Name Here"
bla
bla
bla
[+][-]07/17/08 04:27 PM, ID: 22031300Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/17/08 05:20 PM, ID: 22031525Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/17/08 05:21 PM, ID: 22031529Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/17/08 05:48 PM, ID: 22031681Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/17/08 07:12 PM, ID: 22032401Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: VB Script, Windows Batch Scripting
Tags: Script
Sign Up Now!
Solution Provided By: RobSampson
Participating Experts: 2
Solution Grade: A
 
[+][-]07/17/08 07:55 PM, ID: 22032559Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/17/08 08:19 PM, ID: 22032649Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/18/08 09:40 AM, ID: 22037625Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/18/08 10:09 AM, ID: 22037856Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/18/08 10:12 AM, ID: 22037878Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/18/08 11:05 AM, ID: 22038251Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/18/08 01:37 PM, ID: 22039593Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/18/08 02:03 PM, ID: 22039796Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/18/08 02:29 PM, ID: 22039961Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07/18/08 04:09 PM, ID: 22040554Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/18/08 04:19 PM, ID: 22040586Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/18/08 04:20 PM, ID: 22040588Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 / EE_QW_2_20070628