Extracting parts of info from a file written by a REG query?

Hewlett-packard / Pavilion hpe
March 28, 2014 at 11:34:55
Specs: Windows 7 Professional, 3.6GHz 16GB
REG QUERY HKEY_CLASSES_ROOT\http\shell\open\command /ve> DefaultBrowser.dat

Which writes this to "DegaultBrowser.dat":

(Standard) REG_SZ "C:\Firefox\Firefox.exe" -osint -url "%1"

How would I extract only the file name of the "default browser" name? (in this case "Firefox.exe") I couldn't make a FOR loop to extract it (though I am not very good with foor loops either). The reason I don't go by the findstr method is that the .exe name changes depending on what is the default browser, and there are like tons of different browsers out there.

message edited by RainBawZ

See More: Extracting parts of info from a file written by a REG query?

Report •

March 28, 2014 at 12:52:39
I think you need to rethink what you're doing here. Why do you need to know the user's default browser? What does your batch script gain from it?

How To Ask Questions The Smart Way

Report •

March 28, 2014 at 14:20:38
First it opens an url with the default browser on the current system, then continues when the web browser process has been terminated.

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner

Report •

Related Solutions

Ask Question