Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 14 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
I am extracting certain values out of the registry using REG QUERY by piping them through FIND and then writing the data to a text file. An example of the code...
C:>ECHO Binary is C:DOCUME~1userLOCALS~1Temp123.exe
Binary is C:DOCUME~1userLOCALS~1Temp123.exe
C:>ECHO Binary is "C:Documents
Binary is "C:Documents
As you can see, if the path doesn't have spaces everything works great. My question is this; how can I obtain the full path including the quotes using FOR so that I can pass this on to additional code.
The reg.exe produce a tab separated list. The FOR command use a spaces or tab delimiter. You need to tell the FOR command to use only tab as a delimiter.
Change the command to line below. There is a TAB after the delims= . Ensure your text editor don't change the tab to space. The Notepad is a good choice it inserts tab if you press press TAB button.
Thanks Gyorgy! I tried using similar code originally, but my editor was in fact converting the TAB to a SPACE. This is exactly what I was looking for. Thanks again!
This topic is 14 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.