Sign in to follow this  
Followers 0
MasonMill

regread

5 posts in this topic

#1 ·  Posted (edited)

Hey Guys,

Whats the best way to find the registry path to a certain program? I'm trying to do something like:

Global $dir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\someprogram", "Program Path")

shellExecute($dir & "\something.exe")

thanks!

Edited by MasonMill

Share this post


Link to post
Share on other sites



yes !

But you can find diiferents names key for install path

like Program Path or Install Directory or InstallDir...


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

doesnt work though, does it matter than im using win7 64bit? The programs will be in the x86 programfiles

Edited by MasonMill

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

doesnt work though, does it matter than im using win7 64bit?

It's possible !

but i'm on 32bit i can't give you registry's key name !

When running on 64-bit Windows if you want to read a value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64.

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

the problem you have is that not all applications put the install path in the registry, and even if you do find one, there is no standard key name to use for the install path.

For example, my AVG uses 'AVGPath' as the key that holds the app location, but Ashampoo Burning Studio uses "AppDir"

you could possibly use the folloing location to get it though

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders

as this will list all the folders that 'installed' applications have created.

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