I have an Excel file with several macros in it, some call SolidWorks, some with PDM, some call acrobat pro. Several different users will use this spreadsheet, for different reasons, a few won't have SolidWorks, some won't have Acrobat Pro, this is causing library reference missing in some computers, and if missing any reference, none of the macros will run. I search for an easy solution like just don't run the missing library macro but couldn't find it. My next thinking was to add the libraries to the vault and all could run from there, not possible. maybe if I just copy the reference files to each computer would work, and it did, even without acrobat, just creating the folder path with the *.tlb in it works like a charm, question now is how to create all those folder structures with all referenced files in all computers. Batch file. As I could find online and examples, this should work but it's not and I don't know why, even used some bat test tools and all say is good. is some network configuration? privilege issues? here is part of the code. the rest just repeat for Solidworks and PDM files.
@ECHO OFF
IF EXIST "C:\Program Files (x86)\Adobe\" (
) ELSE (
mkdir "C:\Program Files (x86)\Adobe")
IF EXIST "C:\Program Files (x86)\Adobe\Acrobat 11.0\" (
)ELSE(
mkdir "C:\Program Files (x86)\Adobe\Acrobat 11.0")
IF EXIST "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\" (
)ELSE(
mkdir "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat")
IF EXIST "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\acrobat.tlb"(
)ELSE()
xcopy "\\eng\Lib\acrobat.tlb" "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\"
ECHO "dONE!"
I'm trying to check if the folder structure exists, if not create the folder structure as is in excel reference and copy the file, it just doesn't work. How do I make it work? Is there a better way?