Jump to content

Copying files over a VPN


JonF
 Share

Recommended Posts

I have a server running Small Busines Server 2008.  On that server is a shared directory containing Microsoft Office templates in the normal directory setup; a bunch of templates, a Smart Art subdirectory, and a Document Themes subdirectory containing Theme Colors, Theme Effects, and Theme Fonts subdirectories.

My task is to create a program that copies all that to the local user's templates subdirectory.  It must work on the local network or over the VPN.  I am not allowed to wipe the local template directory. I may not assume that any drives are mapped, I have to use UNC paths to the server. So a .cmd file doesn't work because it doesn't do UNC paths, at least copy and xcopy and robocopy don't.

This morning I sat down with AutoIt and came up with:

 

#include <File.au3>
#include <Array.au3>
#include <FileConstants.au3>

$LocalPath = EnvGet("APPDATA") & "\Microsoft\Templates\"
$Result = DirCopy("\\192.168.7.250\Users\<redacted>\<redacted>\<redacted>\<redacted> Templates 2",$LocalPath,$FC_OVERWRITE)
MsgBox(0,"Info",$Result)

Works on the internal network. Works when I connect to our guest network (which is a different subnet) and connect to the (SoftEther) VPN.  Does not work when connected to the VPN on physically remote machines.

?????

 

Link to comment
Share on other sites

  • Developers

Guess you arent allowing something via vpn. Are all mickysoft required ports open and can you browse the fileshare with the explorer when connected via vpn?

jos

 

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...