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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simultaneous VPN connections w/ rasdial and net use

Status
Not open for further replies.

tranahi

Programmer
Apr 21, 2008
1
US
I currently have several DOS batch files executing from a W2K server. Within each batch file I am connecting via vpn (using rasdial) to a clients computer. Once connected I map a drive with net use and use xcopy to send/receive files between our server and each clients server. The batch files also execute foxpro programs. I am using several different VPN's, including Cisco, Checkpoint, and Windows.

The batch files execute fine if I run them one after the other. I currently have them scheduled 10 minutes apart in Windows Task Scheduler. However, when I attempt to run them at the same time, the batch programs seem to get confused with the drive mappings and the file copy fails. The bigger issue this is causing is that it is corrupting my foxpro tables and the application becomes unusable for the clients until I repair the table indexes. The reason I want to run them simultaneously is that we are going to have several clients running this software and the batch files need to execute at the very minimum every half hour. With each batch file taking 4-6 minutes to run, I really can't have them waiting on each other for completion. I will only be able to have 3 or 4 clients running within the half hour window and this will become an issue.

I suspect that the issue is with the net use, but I am not positive. Maybe it has something to do with the vpn connections, but they seem to stay up without any problem. Possible IP confusion?? I am posting here in hopes that someone may have had a similar situation and can guide me in the right direction.

Here is the code that is used for each client, with the rasdials,'net use',directories, etc changed as needed:

@echo Retrieve updates start >> testlog.txt
f:\programs\getupdates <---foxpro program
rasdial "ClientA VPN" user pass
net use x: \\10.x.x.x\data /user: domainA\user pass
xcopy f:\data\testA.dbf x:\ClientA\Data /y
xcopy x:\ClientA\Data\testdown.dbf f:\data /y
net use x: /delete
rasdial "ClientA VPN" /disconnect
exit

Any help is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top