Search reg key and open a file from location

Microsoft Windows xp professional w/serv...
December 24, 2009 at 08:24:33
Specs: Windows XP

I want a script that will read a reg key and then open a file from the directory in that reg key. How would I do this? Batch VBS AHK?

If I use batch I though to look at location in the the reg key maybe this? If a different script is easier to work with I don't mind. I have some experience with .bat and .vbs.


@echo off
reg query HKEY_CURRENT_USER\Software\Companyname\productmane /v Keyname || echo Does not Exist!!!!


I know thats not close to everything. I was just brainstorming. :)

So that key points to a file in a specific directory. Example:

Program Files\Company name\program title\folder\file.txt

I want to open a different file in that directory, make a backup of that file to that directory before opening, and then have a messagebox appear after closing that file. Is this possible?

See More: Search reg key and open a file from location

Report •

December 25, 2009 at 04:45:19
Just trying some stuff, you'll find some answers in here:

@echo off
for /f %%f in ("C:\text.txt") do (
set p_path=%%~pf
set p_drive=%%~df
echo copy %%f %p_drive%%p_path%text.bak
echo do something with %%f

Report •
Related Solutions

Ask Question