Copy files with startup script

M

Mike Farren

I want to use a simple batch file to copy and register files in a startup
script. I do this because I don't allow the users to write to the folders
or register the files. Registration is working if the files are present,
problem is it never copies them in from a share. Here's a copy of the
script files are located in the snapshot share and the local directories
exist:

Try 1 with long names and shares, which I realized later, the mapped drives
don't exist until logon script runs.

regsvr32 /u /s "C:\Program Files\OOJ EDMS\AIMS Controls\ALI_Link.OCX"
xcopy g:\snapshot\OCX_Up\ali_Link.ocx "C:\Program Files\OOJ EDMS\AIMS
Controls" /y
regsvr32 /s "C:\Program Files\OOJ EDMS\AIMS Controls\ALI_Link.OCX"

regsvr32 /u /s "C:\Program Files\OOJ EDMS\AIMS Controls\ALI_Evidence.OCX"
xcopy g:\snapshot\OCX_Up\ali_Evidence.ocx "C:\Program Files\OOJ EDMS\AIMS
Controls" /y
regsvr32 /s "C:\Program Files\OOJ EDMS\AIMS Controls\ALI_Evidence.OCX"


Try 2 with UNC and short names


regsvr32 /u /s "C:\Progra~1\OOJEDM~1\AIMSCo~1\ALI_Link.OCX"
xcopy /d /y /s \\treotest\snapshot\OCX_Up\ali_Link.ocx
"C:\Progra~1\OOJEDM~1\AIMSCo~1\ali_link.ocx" /y
regsvr32 /s "C:\Progra~1\OOJEDM~1\AIMSCo~1\ALI_Link.OCX"

regsvr32 /u /s "C:\Progra~1\OOJEDM~1\AIMSCo~1\ALI_Ev~1.OCX"
xcopy /d /y /s \\treotest\snapshot\OCX_Up\ali_Ev~1.ocx
"C:\Progra~1\OOJEDM~1\AIMSCo~1/ali_Ev~1.ocx" /y
regsvr32 /s "C:\Progra~1\OOJEDM~1\AIMSCo~1\ALI_Ev~1.OCX"
 
M

Mark Straver

Mike said:
I want to use a simple batch file to copy and register files in a startup
script. I do this because I don't allow the users to write to the folders
or register the files. Registration is working if the files are present,
problem is it never copies them in from a share. Here's a copy of the
script files are located in the snapshot share and the local directories
exist:

Without a logon, you don't have access to file shares. Perhaps that is
your problem?

Do you have the proper rights set on the shares?
 
M

Mike Farren

That was a thought I'd had, the rights are set, and I know the shares aren't
there, but I should be able to do it with a UNC path correct? My bad, I
should have stated that earlier.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top