Results 1 to 4 of 4

Thread: How to catch a key path? HELP!!!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Location
    Singapore
    Posts
    67

    How to catch a key path? HELP!!!

    How to catch a path of an application file from registration key?

    if i click a button n no response then a message should display the actual path of file from registration key

    which i can put the key path in

    Shell "C:\ABC\.......", vbNormalFocus
    Last edited by eric016; Sep 7th, 2004 at 11:26 PM.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132
    I'm not quite sure but hopefully the following is what you need:
    VB Code:
    1. Dim strPath As String
    2.  
    3. strPath = GetSetting(sApp, sSection, sKey) 'set actual values or this line will error otherwise
    4. If MsgBox("Would you like to run this program:" & vbNewLine & strPath, vbYesNo,"Confirmation Required") = vbYes Then
    5.     Shell strPath, vbNormalFocus
    6. End If

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Location
    Singapore
    Posts
    67
    i understand the flow of ur code, but why it still cant catch the path n display invalid procedur call or argument???

    i think it cant work-->strPath = GetSetting(sApp, sSection, sKey)

    pls tell me why
    tks


  4. #4
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132
    It's just a sample, eric.
    In your earlier post you've mentioned this:
    "... message should display the actual path of file from registration key ..."

    So assumed that you are getting your value from the registry. If you do then use use your own procedure or reffer to MSDN for more information on GetSetting() function.

    Cheers

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