Batch for multiple program installs

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Tguy3006
Posts: 1
Joined: 30 Mar 2020 10:56

Batch for multiple program installs

#1 Post by Tguy3006 » 30 Mar 2020 11:11

I am trying to write a batch file on a USB drive to install multiple programs to a PC. This is to be used for new PC installs for a client. Basically what i want it to do is install these programs one at a time, and skip any programs that are already installed, due to some of them requiring a restart. The first program is of course Office 365. here is what i have so far:

@echo off
IF EXIST "C:\Program Files\Microsoft Office 15\ClientX64\OfficeClickToRun.exe" GOTO :END
pause
start D:\Clientfolder\ClientPrograms\Setup.Def.en-us_officeinstallfilename
:END
:sub_message
Office installed

I added a pause to better diagnose the issue. The problem is that no matter what form i put the file path in, it either skips to start the installation, even though i have confirmed the location of the existing file, or doesn't pause at all. I am very new to batch files, in fact this is only the third or fourth that i have ever written, and the previous required much googling, but this time i am stuck. Any suggestions are appreciated!

warlock666999
Posts: 4
Joined: 09 Apr 2020 11:05

Re: Batch for multiple program installs

#2 Post by warlock666999 » 13 Apr 2020 10:31

Try this:

Code: Select all

@echo off
IF EXIST "C:\Program Files\Microsoft Office 15\ClientX64\OfficeClickToRun.exe" GOTO sub_message

echo Office not Installed 
echo Starting Office Installation...
"D:\Clientfolder\ClientPrograms\Setup.exe"
pause
goto end

:sub_message
echo Office is Installed
pause
goto end
pause

:end

Post Reply