Results 1 to 24 of 24

Thread: X = Shell("aol.exe", 1)

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    when I try this: X = Shell("aol.exe", 1)

    It says file not found. Can someone help me ?

  2. #2
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    Hi,
    Try fully qualifying the pathname.
    e.g.X = Shell("C:\America Online 4.0\aol.exe", 1)
    Al.


    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:[email protected]
    [email protected]">[email protected]
    [email protected]</A>

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    It still dose the same thing: File not found.

  4. #4
    Addicted Member
    Join Date
    Feb 2000
    Posts
    224

    Post

    First findout where your aol.exe is by
    running find program.
    and then report back for the answer!

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    C:\America Online 5.0

  6. #6
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330

    Post

    Hi,
    I just started AOL with:

    Code:
    Sub Main()
    x = Shell("c:\america online 4.0\aol.exe", 1)
    End Sub
    Al.




    ------------------
    A computer is a tool, not a toy.
    <A HREF="mailto:[email protected]
    [email protected]">[email protected]
    [email protected]</A>

  7. #7

    Post

    X = Shell("C:\America Online 5.0\aol.exe", 1)

  8. #8

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    It still dose not work, Is there any way I can open Explore?

  9. #9
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305

    Post

    you have to find the path of AOL on your computer and put that path and the name of the program in the quotation marks. It is different on a lot of computers, but if you just want to use it on yours, find the path of the program you want and put that in the quotation marks.

  10. #10

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    How would I find the path?

  11. #11
    Junior Member
    Join Date
    Jan 2000
    Location
    wrrj
    Posts
    26

    Post

    Back to square one...

  12. #12

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    Ok, I`m trying to make a program that starts aol and types in my password and signs me on How would I go about doing that?

  13. #13
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670

    Post

    Right-click on the AOL icon (on your desktop probably). Click on Properties.
    Highlight the text in the "Target" box, right click and select COPY.

    In VB;

    X=Shell( [paste the text here] ,1)

    Make sure the text has " either end.

    This should work.
    Once the program has been shelled by VB you can use the SendKeys function to send it the keystrokes necessary to log onto AOL.



    ------------------
    Mark "Buzby" Beeton
    VB Developer
    [email protected]



  14. #14

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    I just tried that and it still will not work Now when I just try aol.exe is says "Out of memory" what should I try now I`v been working on it for 2hrs and it still dose not work.

  15. #15
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    AOL stores it's application path i the registry. So it is very easy to get that path from there.

    Copy this code to your form:
    Code:
    Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
    Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
    Private Const HKEY_LOCAL_MACHINE = &H80000002
    Private Const ERROR_SUCCESS = 0&
    Private Const KEY_QUERY_VALUE = &H1
    Private Const KEY_NOTIFY = &H10
    Private Const READ_CONTROL = &H20000
    Private Const KEY_ENUMERATE_SUB_KEYS = &H8
    Private Const STANDARD_RIGHTS_READ = (READ_CONTROL)
    Private Const SYNCHRONIZE = &H100000
    Private Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))
    Private Const REG_SZ = 1
    
    Public Function GetAOLPath() As String
        Dim lKeyHandle As Long
        Dim lRet As Long
        Dim strBuffer As String
        Dim strKey As String
        Dim strValue As String
        
        strKey = "SOFTWARE\America Online\America Online\CurrentVersion"
        strValue = "AppPath"
        lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE, strKey, 0, KEY_READ, lKeyHandle)
        If lRet = ERROR_SUCCESS Then
            strBuffer = Space(255)
            lRet = RegQueryValueEx(lKeyHandle, strValue, 0, REG_SZ, ByVal strBuffer, Len(strBuffer))
            If lRet = ERROR_SUCCESS Then
                GetAOLPath = Left(strBuffer, InStr(strBuffer, vbNullChar) - 1)
            End If
            RegCloseKey lKeyHandle
        End If
    End Function
    Then, use this function like this:

    Call Shell(GetAOLPath & "\aol.exe", vbNormalFocus)

    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

  16. #16

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    Sorry, but when I try to copy is says "not enougn room to paste into current line"
    when I paste part of it dose not return after each line/
    I think my computer hates me

  17. #17
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Click on Edit post (a little icon with the pencil) on top of my post, the you can select the exact code from there.

    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

  18. #18

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    I hate to bug all of you but when I try to compile it says " error expected sub staic or function " and highlights the firse declare.

  19. #19
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Copy the code I've posted to General declartion of the form.

    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

  20. #20

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    It Dose the same thing?

  21. #21
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    You're pretty damn lazy.

    ------------------
    DiGiTaIErRoR
    VB, QBasic, Iptscrae, HTML
    Quote: There are no stupid questions, just stupid people.

  22. #22

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    14

    Post

    Yep and i`m dumb.

  23. #23
    Guest

    Post

    *ouch* sorry, but read some vb - books

  24. #24
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    why don't you try:
    Shell "C:\America Online 5.0\aol.exe &lt;UserName&gt; &lt;Password&gt;" ?

    ------------------
    DiGiTaIErRoR
    VB, QBasic, Iptscrae, HTML
    Quote: There are no stupid questions, just stupid people.

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