Results 1 to 3 of 3

Thread: To read from registry

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    1

    Question

    I'm opening wordpad through my application. The application is used on multiple platforms. I need to find the path to locate wordpad and store in a variable which I can pass using the shell command. Any help will be appreciated.

    'get path and assign to variable
    'i = shell(variable,1)
    'Instead of hardcoding as below
    i=shell ("C:\Program Files\Windows NT\Accessories\wordpad.exe",1)
    Pam

  2. #2
    Lively Member
    Join Date
    Jul 2000
    Location
    Ireland, Dublin
    Posts
    76

    Talking

    Use the FindFirstFile API function.
    Send it the windows path and wordpad.exe.
    This should find the file.
    You can find reference to this on http://www.vbapi.com

    Hope this helps.

    IJ
    ---------------------------------
    TopMan
    ---------------------------------

  3. #3
    Lively Member
    Join Date
    Nov 1999
    Location
    Melbourne, Victoria, Australia
    Posts
    126

    Red face

    RetVal = Shell("wordpad.exe",1)

    That will check the current OS path and run wordpad.exe from it, will work on most Windows installations, inclduing NT, 9x, 2000 etc...

    Regards,

    Paul Rivoli
    ---------------------
    [email protected]
    http://members.dingoblue.net.au/~privoli

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