Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Parse a registry query
Name: Machiavelli Date: March 19, 2009 at 06:53:40 Pacific OS: Windows 2008 Subcategory: Batch
Comment:
Hi guys. I am trying to retrieve a key value from the registry and then parse it so that all I get is the value it self. I haven't been able to get it working.
This is what I have so far:
FOR /F "tokens=3" %%i in ('reg query "HKCU\Volatile Environment" /v USERDNSDOMAIN') DO (echo %i)
Name: IVO Date: March 19, 2009 at 09:53:19 Pacific
Reply:
If the For /F is embedded in a batch script you need to code (echo %%i) not %i, on the contrary if the statement is entered at prompt the first %%i must be replaced by %i innstead.
That does not take into account the parse process itself.
Summary: You wasted all that time finding and posting 3 msg's that airnt even what i asked. I asked for a sample code for REMOVING a reg key. not to add one, not to use the command reg edit. maybe if i say it ...
Summary: Can someone show me a simple way to create a registry backup using batch. I searched the net with google with no luck, all I need to do is create a backup with batch and store it somewhere on the hard...
Summary: Hi I want to read a registry setting "HKEY_LOCAL_MACHINE\SOFTWARE\Seagate Software\Crystal Reports\Path" and save whatever Path is (eg C:\\Apps\\Crystal85\\) into a variable and check if a file crw32...