Jump to content

Script to copy folder and contents at startup


Recommended Posts

Posted

Been presented with yet another woderful educational software package to install, should be ok as it's compatible with W98:mad:

 

I've written a script to install it silently, but the program needs a folder and it's contents copied to the client pc.

 

My script makes a folder, installs the software, but copies the folder and not the contents. It's a batch file, simple xcopy with /s /e /d, works when I run it manually but not at startup. The paths must be right as the folder is copied but not the contents.

 

Any ideas where I might be going wrong?

Posted (edited)

Robocopy will be better. It will create all the required folders for you and copy all the contents of the source. I have found xcopy to be hit and miss at times. Does your server share have permissions do domain computers can see the contents?

 

robocopy "\\soruceserver\share" "C:\destination-folder" /MIR

 

What client OS are you running?

Edited by FN-GM
  • Thanks 1
Posted

The server wouldnt matter.

 

Its built into Windows 7 but not XP. You can extract a copy of robocopy.exe from the Windows XP Support tools. You can just stick robocopy.exe in a shared drive.

 

On your source share does the computer group "domain computers" have read rights?

Posted

Right - checked my switches and I'd changed /s for something else. Put /s back on works like a dream.

 

Decided not to install at startup though, as the software has eight parts to it each needing a folder copying. So have written a script to do all the copying and installing, but am going to do it manually on each teacher laptop as I also have 2 other new programs to install, one of which needs the usb device plugged in whilst the software installs:mad: TBF though it does mean that I get to give staff laptops the once over!

 

Nice little job whilst running the creche in the IT suite during parent's evening next week.

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



×
×
  • Create New...