Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pcANYWHERE OLE code for VB 19

Status
Not open for further replies.

fwadmin

IS-IT--Management
Jun 23, 2005
6
0
0
US
I have a bunch of pcANYWHERE script files written to do various automatic transfers. It seems that Symantec's newer versions of pcANYWHERE no longer support the script files and now use OLE for integration into other applications. The documentation for this completely stinks in that they give no VB examples of invoking transfers.

Anyone out there have any VB code with pcAYNWHERE they can share?

Thanks.
 
Update on the code that I put on the 56th post

If files exist in the temporary remote folder delete them
If fso.FileExists("S:\temporaryrecievingfolder\*.txt") = True Then
Kill ("S:\temporaryrecievingfolder\*.txt")
End If

this wont work as the fso object dosent check for wild cards

solution!

replace the check using the dir$

If Dir$(&quot;s:\pollingfil101\*.fil&quot;) <> &quot;&quot; Then
Kill (&quot;S:\pollingfil101\*.fil&quot;)

End If
 
Millon Thanks to sibasis

How would i forcefully disconnect if the connection is for more than a specified time (Say an hour). Coz when i was testing over night, i found that the program got stuck and the connection was still active when i came in the morning to check.

Rest seems to working fine.. Thanks Again for all your ppls help.

Cheers


 
Hi all,

i've included Meldric's code into my vb 6 application, and adjusted it.
While in run time, i'm getting a runtime error as following:
Runtime error'2147417851 (80010105)
Automation Error
The server threw an exception

In fact i need to have my local application (on remote) launch an application on my host and make a file transfer and then finish performing some actions on the remote during my remote connection time.

Any idea where this error comes from, or what i should better do ?

Thanks for your help.

Hey guys... This forum is great !
 
Is it possible to use the SENDKEYS command to issue commands to an open Host application after connected?

Thanks for your help!
 
Hi All,

Thanks for all the great help. I can understand what I'm supposed to do now.

I've still got a few issues:
1) Does pcAnywhere have to be running on the remote for the VB App to work?
2) I can't connect to a remote network host, must I set all of the parameters in the CHF file to a value? I copied the chDefault.CHF to Test.CHF then altered names and connection type, but thats all.
3) What's the difference between the passwords
4) In sibasis code (BTW-TY), what does it mean to register things with the IDE?

I've been programming for years, but I have only now started to use VB in earnest, this is my first project and I'm not certain how to get results.

Thanks again.
 
AidanCMS,

1. PCanywhere dosent need to be running on the remote for the Vb app to work.
2. Are you tryin to connect to the network host thru a script ? If it connects manually to the host then &quot;remoteobject.awconnect(hostname)&quot; in your script should connect you to the host.
3.The password on the settings tab gives you access into the host, the other password on the protect item (which I have never used) gives you access to the remote object itself.
4.When you set a reference(register) to another application's type library, you can use the objects supplied by that application in your code. For example, if you set a reference from Microsoft Access to the Microsoft Excel library, you can then use Microsoft Excel objects through Automation (formerly called OLE Automation).

I have been working on some intranet app for the last 1 month, havent been payin attention to pcanywhere recently :eek:)

Lemme know if this helps...

...!
-Sibasis
 
hey bmcmillen2002,
Are you Brian with Harrison Foods?
 
Hi Fred57

regarding your post on Apr 17:

Hi all,

i've included Meldric's code into my vb 6 application, and adjusted it.
While in run time, i'm getting a runtime error as following:
Runtime error'2147417851 (80010105)
Automation Error
The server threw an exception

In fact i need to have my local application (on remote) launch an application on my host and make a file transfer and then finish performing some actions on the remote during my remote connection time.

Any idea where this error comes from, or what i should better do ?

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

did you manage to solve it? I'm having problems at the moment with a VB6 application that too uses OLE Automation services, and is very similar to Meldric's code with the CreateObject call.

It works fine on my own PC (operating system NT4) and workstations running Windows 2000 Server, but when I try and run it on Windows 2000 workstation version (with SP3) it gets the exact same error you have.

The OLE dll's and tybelibs (sdtdole2.tlb, oleaut32.dll etc) on all machines are identical, so I'm wondering if it's some Windows 2000 permissioning issue?? If anyone has any ideas please let me know

thanks
Mark
 
Hi all,
I have written a program that uses the pcaw automation to automatically download files on a daily basis. It works great most of the time, about 75%, however, I am rather stumped on the other 25%. For some reason, the file transfers just do not work, and without any sort of error checking within the pcaw object, it is rather difficult to trouble shoot. Most of the time, rebooting the host machine or restarting my program will fix the issue and the download will work, however, this is not something I want to have to do on a daily basis. Has anyone else had similar issues or any ideas on what's going on?

I'm using:
Delphi 5
PCAW 10.5
Windows 2000

tia,
aaron
 
Does anyone knows how to get the pcanywhere remote name &quot;variable&quot; using VB?

I'd like to have a script on the host computer that everytime someone uses pcanywhere to connect will log to my own log the computer name that is connecting to my host computer.

I know the variable exists, I'm currently logging to the windows events, and it records the remote name, but I'd like to know how to get it to use it in my script.

any help will be appreciated!

 
Hi, By making of use of code related to Awrem32.Application we were able to connect to a host, open a file from the host and then execute it. During our development we were working on PCAnywhere10.5. This was a VB application.
Now when our application is to be deployed, the machine on which it is supposed to be deployed version of PCAnywhere is PC Anywhere 9.2.0.
Now My question is- Is it somehow possible to have the VB exe containing the source code making use of object Awrem32.Application, to be possible to run on a machine which does not have PCAnywhere 10.5 or higher ? If it is possible, then How ? As i said, development is complete only we need to deploy it on the machine with lower version of PCAnywhere.
Thanks in advance, //Balwinder
 
Is there a tool or utility I can use to convert old scripts to the new OLE format? Or do I need to re-write all of them.

Thanks
 
Hello, I have an old PCAnywere script that uses the command 'receive file &quot;filename&quot;' It does not specify the directory from which itt is receiving. Is there a way to do this using VBScript? Should the remote path just be &quot;.\&quot; ? What should I do?

-Mike
 
I find this site very useful, but I still can't solve my problem when writing an OLE code for auto-tranformation of files between the host and the remote machine. My problem is that when I start receiving files from the host machine, the PCA prompts an error msg: &quot;Unexpected error in AWREM32.exe...&quot;. I am connecting the host machine using 56K modem, does anyone know what happen? I have tried to do some pause after login to the host before starting the transmission, but it didn't work. Did anybody has experience on such problem or have some code that are work for auto-transmission of files written in VB? It would be grateful if this problem can't be solved. I have been disturbing with this error for already 3 weeks. Thanks in advance first
 
Hi Fred57/mark66

regarding your post on Apr 17:

Hi all,

i've included Meldric's code into my vb 6 application, and adjusted it.
While in run time, i'm getting a runtime error as following:
Runtime error'2147417851 (80010105)
Automation Error
The server threw an exception

In fact i need to have my local application (on remote) launch an application on my host and make a file transfer and then finish performing some actions on the remote during my remote connection time.

Any idea where this error comes from, or what i should better do ?

-----------------------------------------------------------
Try this:
1. Open an session of AWREM32.exe directly from an explorer window.
2. Then open your .chf file. This will let you know if AWREM32 is capable of establishing a connection with given .chf file prior to attempting a transfer or launcing a host app.
3. If you do not make a connection then your vb program most likely is not as well, and you will get the Runtime error.

Note: My problem was that when I openened awrem32.exe, and then my .chf, I discoved that I was attempting to run it from an a folder (on my local root dir.) that was not a valid pcAnywhere data directory structure (such as All Users/Aplication Data/Symantec/pcAnywhere). After I called the .chf from a valid directory, and got a connection, I no longer recieved the Runtime error.
 
Hi all!

I want to delete files on host computer but I didn't any solution for this.

I am using the Visual Foxpro, Pcanywhere 10.5 and Windows XP

Thanks for your help
 
mehmetcan,

The only way I do it is to right a batch or an exe script, transfer it over to the host and execute it there to perform the delete operation. I use a batch script and it works fine for me. I flag the batch script and but a date and time stamp on the log file just to feel I have some control :eek:)

Lemme know if thats what you were talking about ... ?

-Sibasis

 
For mehmetcan,

I've written a couple of small programs to do things like create a directory list for files to transfer and an archiver/file killer. They don't have to be in the subdirectory that your other files are in, just as long as you call them with a fully qualified path.

Execution about ar reliable as file transfer.

Has anyone tried Version 11 yet? Is it any better than 10.5?

Cheers,

Aidan
 
FYI

I saw some reviews of pca 11 not being so good :eek:), they said stick to 10.5 ...
Lets see how this goes! I am waiting for PCA to get compatible with .NET IDE :eek:)
 
Thanks for that sibasis... I'll be able to save wasted hours of testing

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top