when I try this: X = Shell("aol.exe", 1)
It says file not found. Can someone help me ?
Printable View
when I try this: X = Shell("aol.exe", 1)
It says file not found. Can someone help me ?
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>
It still dose the same thing: File not found.
First findout where your aol.exe is by
running find program.
and then report back for the answer!
C:\America Online 5.0
Hi,
I just started AOL with:
Al.Code:Sub Main()
x = Shell("c:\america online 4.0\aol.exe", 1)
End Sub
------------------
A computer is a tool, not a toy.
<A HREF="mailto:[email protected]
[email protected]">[email protected]
[email protected]</A>
X = Shell("C:\America Online 5.0\aol.exe", 1)
It still dose not work, Is there any way I can open Explore?
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.
How would I find the path?
Back to square one... ;)
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?
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]
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. :(
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:
Then, use this function like this: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
Call Shell(GetAOLPath & "\aol.exe", vbNormalFocus)
------------------
Serge
Senior Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
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 :(
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
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.
Copy the code I've posted to General declartion of the form.
------------------
Serge
Senior Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
It Dose the same thing?
You're pretty damn lazy.
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
Yep and i`m dumb.
*ouch* sorry, but read some vb - books
why don't you try:
Shell "C:\America Online 5.0\aol.exe <UserName> <Password>" ?
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.