Results 1 to 11 of 11

Thread: How to detect if Opera is installed ? (and get the Opera folder location)

  1. #1

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Arrow How to detect if Opera is installed ? (and get the Opera folder location)

    I have searched the 'Opera community forum' and Google for last 60 minutes, but can't find any answer.

    Can anyone please tell me if there is any way to programetically detect wheather Opera is installed in my client's PC or not ?
    Also, Is there any way to detect Opera installation folder ?


    Thanks in advance.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  2. #2
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    if using VB 6, then try using SearchTreeForFile API. it will give you the path of the file.

    since i dont have Opera installed, i tried for FireFox and it worked.

    VB Code:
    1. Private Declare Function SearchTreeForFile Lib "imagehlp" (ByVal RootPath As String, ByVal InputPathName As String, ByVal OutputPathBuffer As String) As Long
    2.  
    3. Private Sub Form_Load()
    4.    
    5.     Dim tmpStr As String, myResult As Long
    6.    
    7.     tmpStr = String(260, 0)
    8.    
    9.     myResult = SearchTreeForFile("c:\", "filename with extension", tmpStr)
    10.     If myResult <> 0 Then
    11.         MsgBox "Location : " + Left(tmpStr, InStr(1, tmpStr, Chr(0)) - 1)
    12.     Else
    13.         MsgBox "File not found!"
    14.     End If
    15. End Sub
    Harsh
    Show Appreciation. Rate Posts.

  3. #3

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    Thanks Harsh.

    I posted same question in Opera community and received a reply.

    If anyone knows ANY other information on this topic, please please help me.

    Thanks !
    Last edited by iPrank; Apr 14th, 2006 at 09:44 PM.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    Just remember, users like myself have Windows installed on a different drive other than C. My opera install is located in E:\Program Files\Opera\

    Having said that, I also wouldn't rely on the filename as I can rename Opera.exe to IHateInternetExplorerThisMightBeOpera.exe. Opera would still work but your function would not.

    I would see if the opera develoeprs could shed any light on this
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  5. #5
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    yes, we all forgot about the registry thingy. you could take a look at RegOpenKeyEx API or RegOpenKey.

    sorry, could not help much on this. i have never used these APIs before.

    this will still work even if ppl change the name of the exe.

    Harsh

    EDIT: remember to use RegCloseKeyEx to close the open registry value.
    Show Appreciation. Rate Posts.

  6. #6

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    Thanks. I know 'bout those registry APIs.

    I was looking for those exact Keys.
    ..anyway now it is time to fireup VM and test with all versions of Opera I have.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  7. #7
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    sorry, my post was not complete.

    you can check for the installed components, Reg Key:

    Code:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\uninstall\Opera (or whatever)
    see if it helps you!!

    Harsh
    Show Appreciation. Rate Posts.

  8. #8

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    Thanks.
    The problem with Opera (and Firefox) is, it doesn't need to be installed everytime you format/reinstall Windows.
    If you backup your profiles and program files, Opera will work anywhere without any problem if required system dlls are present.

    Again, different versions of Opera can stay side-by-side without any problem.

    I guess,I'll first try to get the keys mentioned by haavard and Rijk in my thread at Opera Communiny forum.

    If the keys are not present,I'll use the uninstaller information.

    If nothing is found then I'll use your SearchTreeForFile method with GetFileVersionInfo and VerQueryValue to check company information and fileversion.
    Last edited by iPrank; Apr 16th, 2006 at 09:14 PM.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  9. #9
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    Quote Originally Posted by iPrank
    ...The problem with Opera (and Firefox) is, it doesn't need to be installed everytime you format/reinstall Windows.
    If you backup your profiles and program files, Opera will work anywhere without any problem if required system dlls are present....
    could you shed some light on this.

    you mean that if i just copy-paste the FireFox folder from Program files location to somewhere else (in the back-up drive), then also i can expect the browser to work??

  10. #10

    Thread Starter
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    Not sure about Firefox.
    But for Opera (in singleuser mode) it is true.

    In multiuser mode a simple backup of profile folder and some settings chande in Opera.ini will work.

    In fact, I use a single copy of Opera in every OS in my multiboot system. Saves time - but insecure.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  11. #11
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: How to detect if Opera is installed ? (and get the Opera folder location)

    hmm, wierdo!! will never try such stuff.

    thank you
    Show Appreciation. Rate Posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width