Sign in to follow this  
Followers 0
supraspecies

Subtract part of a registry value? (RegRead)

3 posts in this topic

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



#3 ·  Posted (edited)

@ 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  
Followers 0