Jump to content
Sign in to follow this  
supraspecies

Subtract part of a registry value? (RegRead)

Recommended Posts

supraspecies

Good day. I've searched the forum thoroughly, and haven't found the answer to my problem. Straight to business, not to waste more of your time:

I need to read program path from the registry. Point is - there isn't a direct path. There is a reference to EXE. For example:

RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\program.exe", "Path")

would read the value:

C:\Program Files\Program\Program.exe.

while I need only the path, like this:

C:\Program Files\Program\

Is there any way I can subtract the \program.exe from the value and have just the path? Relatively simple way, if there is any, would be very much appreciated, since I'm a newbie. Thank you in advance.

Share this post


Link to post
Share on other sites
supraspecies

@ JohnOne

Works perfectly! Thank you very much for your help!

Edited by supraspecies

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.