i am trying to launch a program in a sub-directory using Shell function as follows:
Sub Click(Source As Button)
Dim result As Integer
ExeDir="\\C:\Program Files\IBM\Sametime Connect\"
result=Shell(ExeDir + "sametime.exe", 1)
End Sub
It comes back with ‘Illegal Function Call’ error … It does not matter if i use double or single slash before C (though it takes 5 seconds longer to come back with the error when using double slah before C) or use forward or backward slashes.
I copied Sametime.exe to ‘C:\Program Files’ and launched it from there directly - but got some java errors. So i guess it can launch from its own directory only - maybe when i call it from Lotus Script it is not able to make use of other files while Windows is able to … who knows!
I don’t run Sametime so I’m assuming it’s just like any other exe.
If you open a terminal window, cd to the root, and type in C:\WhateverIsThePath\Sametime.exe, does it run? If it does, then you should be able to use the shell command to launch it.
If not, then how does one normally start Sametime for real? If it only launches as part of the Notes client, different problem and no clue how to launch it separately.
This code worked for me to launch Sametime from a view button:
Sub Click(Source As Button)
On Error Goto errhand
Dim ProgPath As String
Dim ProgExe As String
Dim Result As Variant
ProgPath = "C:\Program Files\Lotus\Sametime Client\"
ProgExe = "Connect.exe"
result = Shell(ProgPath + ProgExe,1)
Exit Sub
errhand:
Msgbox "error at line " & Erl & ": " & Error
Exit Sub
End Sub
We are still on Sametime 6.5.1; if you’re using the standalone 7 client based on Eclipse it may not work the same way.