Jump to content
Sign in to follow this  

reg problem

Recommended Posts


i want to make a auto detection to find the dir for Mozilla Firefox.exe

it must return white this: C:\Program Files (x86)\Mozilla Firefox\firefox.exe

it is just like this but then i need the exe

; AutoITCOM 3.1.0
; Testing ByRef variables on COM function calls
; Retrieving the Internet Explorer home page value using registry-read by WMI

$HKEY_CURRENT_USER = 0x80000001

$strComputer = @ComputerName

$objReg = ObjGet("winmgmts:\\" & $strComputer & "\root\default:StdRegProv")
$strKeyPath = "SOFTWARE\Microsoft\Internet Explorer\Main"
$ValueName = "Start Page"
$strvalue = ""
$return = $objReg.GetStringValue($HKEY_CURRENT_USER,$strKeyPath,$ValueName,$strValue)

If $strValue="" Then
    msgbox(0,"WMIGetStringTest", "The value of your IE start page is either Null or could not be found in the registry.")
    msgbox(0,"WMIGetStringTest","Your Internet Explorer start page is: " & @CRLF & $strValue)

Posted Image

Edited by Merchants

Share this post

Link to post
Share on other sites


is it what you are looking for?

MsgBox(64,"",RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe" ,""))

[size="5"] [/size]

Share this post

Link to post
Share on other sites

Yes please do use RegRead instead of the COM Object. And it seems Sh3llC043r points to the right location as well, works on my computer (Win7 x64)

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.