Jonathan Mckee
asked on
Error when running Office 365 install via batch
Hi All, Ive got a batch file which runs at startup. It Assists in our migration of Office 2010 to 365 ProPlus (Locally installed). When I run the batch it says /Config is an invalid switch and 'Setup Executed and ended with error Code 0', could someone be so kind as it look over the script and tell me that Im not going slowly mental. :) BTW Im far from a script expert so there may be mistakes in there!
setlocal
REM ************************** ********** ********** ********** ********** ***
REM Environment customization begins here. Modify variables below.
REM ************************** ********** ********** ********** ********** ***
REM Get ProductName
set "ProductName=O365ProPlusRe tail - en-us"
REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\\catfish.com \netlogon\ Office\Off ice15
REM Set ConfigFile to the configuration file to be used for deployment (required)
set ConfigFile=\\catfish.com\n etlogon\Of fice\Offic e15\config .xml
REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\catfish.com\ netlogon\O ffice\Offi ce15\Insta llLogFiles
REM ************************** ********** ********** ********** ********** ***
REM Deployment code begins here. Do not modify anything below this line.
REM ************************** ********** ********** ********** ********** ***
REM Checks if office 365 is already installed, if so it skips to the end.
if exist "C:\Program Files\Microsoft Office 15\root\office15\OUTLOOK.E XE" goto End
REM Run setup here.
:DeployOffice
start /wait %DeployServer%\setup.exe /config %ConfigFile%
echo %date% %time% Setup executed and ended with error code %errorlevel%. >> %LogLocation%\%computernam e%.txt
REM This cscript called offscrub and removes all office 2010 programs due to ALL switch
cscript "\\catfish.com\netlogon\Of fice\OffSc rub10.vbs" /ALL
REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End
Endlocal
setlocal
REM **************************
REM Environment customization begins here. Modify variables below.
REM **************************
REM Get ProductName
set "ProductName=O365ProPlusRe
REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\\catfish.com
REM Set ConfigFile to the configuration file to be used for deployment (required)
set ConfigFile=\\catfish.com\n
REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\catfish.com\
REM **************************
REM Deployment code begins here. Do not modify anything below this line.
REM **************************
REM Checks if office 365 is already installed, if so it skips to the end.
if exist "C:\Program Files\Microsoft Office 15\root\office15\OUTLOOK.E
REM Run setup here.
:DeployOffice
start /wait %DeployServer%\setup.exe /config %ConfigFile%
echo %date% %time% Setup executed and ended with error code %errorlevel%. >> %LogLocation%\%computernam
REM This cscript called offscrub and removes all office 2010 programs due to ALL switch
cscript "\\catfish.com\netlogon\Of
REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
:End
Endlocal
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.