Get answers from your peers along with millions of IT pros who visit Spiceworks. I'm trying to update the OEMInformation registry with values pulled from csproduct, here is my full script: Batchfile. Best Answer. Verify your account to enable IT peers to see that you are a professional. Here is my new working code: Batchfile. View this "Best Answer" in the replies below ».
Your code works good now. Good work. Pure Capsaicin. Neally This person is a verified professional. Viewed 61k times. I need to get a value in a registry key and store in a variable using a batch file. Improve this question. John John 1 1 gold badge 1 1 silver badge 6 6 bronze badges. What makes you sure the delimiter is tab? On my Win8. I typed "tab" in notepad. When I copy from notepad to here, the tab turns into these 4 spaces. John: I mean on 8.
Sorry, I didn't get it. You and he are correct. I have an very old. Thinking about why it works and my script doesn't, I guess it's because the reg. Thank you! Add a comment. Active Oldest Votes. Improve this answer. DaveO DaveO 3 3 bronze badges. Thank you very much! It worked. I thought the reg query output was a tab. Mark Mark 91 1 1 silver badge 1 1 bronze badge. DOS scripting also has a definition for locally and globally scoped variables.
By default, variables are global to your entire command prompt session. The following example shows the difference when local and global variables are set in the script. If you have variables that would be used across batch files, then it is always preferable to use environment variables.
Following is an example of an output. Batch Script - Variables Advertisements. Previous Page.
0コメント