Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 639
  • Last Modified:

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!


REM *********************************************************************
REM Environment customization begins here. Modify variables below.
REM *********************************************************************
REM Get ProductName  
set "ProductName=O365ProPlusRetail - en-us"
REM Set DeployServer to a network-accessible location containing the Office source files.
set DeployServer=\\catfish.com\netlogon\Office\Office15
REM Set ConfigFile to the configuration file to be used for deployment (required)
set ConfigFile=\\catfish.com\netlogon\Office\Office15\config.xml
REM Set LogLocation to a central directory to collect log files.
set LogLocation=\\catfish.com\netlogon\Office\Office15\InstallLogFiles
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.EXE" goto End
REM Run setup here.
start /wait %DeployServer%\setup.exe /config %ConfigFile%
echo %date% %time% Setup executed and ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt

REM This cscript called offscrub and removes all office 2010 programs due to ALL switch

cscript "\\catfish.com\netlogon\Office\OffScrub10.vbs" /ALL
REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
Jonathan Mckee
Jonathan Mckee
1 Solution
Vasil Michev (MVP)Commented:
I'm not sure if it accepts shortened notations, the full switch should be /Configure.

Lots of info is available on the internet, try for example this guide: http://lyncme.co.uk/office365/office-365-click-to-run-configuration-and-testing-part-1-2/

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now