Outlook 2010 Upgrade Script - PSExec continues to hang

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sourbread
Posts: 23
Joined: 26 Apr 2012 09:10

Outlook 2010 Upgrade Script - PSExec continues to hang

#1 Post by sourbread » 04 May 2012 09:28

Title says it all.. Script executes just fine. All setup files are copied and psexec launches Outlook 2010 setup on a remote machine. Log shows a start time. After 25 minutes, install is already complete but my batch is just hung up... anyone familiar with this problem when using psexec?

Here is my script so far:

@echo off

pushd "%~dp0"

set mth=%date:~4,2%
set day=%date:~7,2%
set yr=%date:~10,4%
set hr=%time:~0,2%
set hr0=%time:~0,1%
if "%hr0%"==" " set hr=0%time:~1,1%
set min=%time:~3,2%
set sec=%time:~6,2%
set mydate=%mth%_%day%_%yr%-%hr%%min%%sec%
TITLE Microsoft office 2010 Upgrade Script
set fnm=computers.txt
set lnm=results-%mydate%.txt
set enm="Error logs/"error-%mydate%.txt

COLOR 07

echo.
echo ==============================================================================
echo Microsoft Office 2010 Upgrade Tool
echo Version: 1.0
echo.
echo ==============================================================================
echo.
echo.
set /p answer=Do you want to continue (Y/N)?
if /i {%answer%}=={y} (goto :yes)
if /i {%answer%}=={yes} (goto :yes)
goto :no

REM -----------------------------------
REM Computer Name and Ping
REM -----------------------------------

:yes
cls
echo.
echo.
set /p computer=What is the IP-Address/Machine Name?
goto :ping

:no
cls
echo.
pause
exit

:ping
cls
echo.
echo ===========================================================================
echo Checking Online Status of %computer%
echo ===========================================================================
echo.

call ping.exe -n 1 %computer%
if %errorlevel% == 0 (
echo.
echo.
echo ===========================================================================
echo %computer% is Online! Installation will resume...
echo ===========================================================================
echo.
timeout 5
goto :setup
) else if %errorlevel% == 1 (
echo.
echo %computer% is Offline
echo ===========================================================================
echo.
timeout 5
echo %computer% >> %enm%
)
cls
goto :laststep




REM -------------------------------------
REM Installation of Microsoft Office 2010
REM -------------------------------------

:setup
cls
echo.
echo ===========================================================================
echo Copying Microsoft Installation Files to %computer%
echo ===========================================================================
echo.
robocopy program_source\ \\%computer%\c$\dload\office /V /ETA /MIR
timeout 3
cls
echo.
echo ===========================================================================
echo Copying Powerpoint Files to %computer%
echo ===========================================================================
echo.
robocopy Powerpoints\ "\\%computer%\c$\Documents and Settings\All Users\Desktop" /V /ETA
echo.
echo.
echo =========================================================================== >> %lnm%
echo Install Started on %computer% %date% %time% >> %lnm%

pskill \\%computer% -accepteula msiexec
pskill \\%computer% -accepteula outlook.exe
psexec \\%computer% -accepteula c:\dload\office\setup.exe

REM --------------------------------------
REM Cleanup and logging of Install Success
REM --------------------------------------

if %errorlevel% equ 0 (
cls
echo.
echo ===========================================================================
echo Completed Setup on %computer%
echo ===========================================================================
echo Successfully installed on %computer% %date% %time% >> %lnm%
rd \\%computer%\c$\dload /s/q
echo.
timeout 5
goto :laststep
) else (
echo.
echo ===========================================================================
echo Installation Failed on %computer%
echo ===========================================================================
echo Installation *FAILED* on %computer% %date% %time% with errorcode %errorlevel% >> %lnm%
echo %computer% >> %enm%
rd \\%computer%\c$\dload /s/q
echo.
timeout 5
goto :laststep
)



:laststep
cls
echo.
echo ===========================================================================
echo All Done!
echo ===========================================================================
echo.
echo.
echo.

set /p again=Is there another PC that needs an upgrade? (Y/N)?
if /i {%again%}=={y} (goto :yes)
if /i {%again%}=={yes} (goto :yes)
goto :no

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Outlook 2010 Upgrade Script - PSExec continues to hang

#2 Post by foxidrive » 04 May 2012 17:34

What do you see in the log?

sourbread
Posts: 23
Joined: 26 Apr 2012 09:10

Re: Outlook 2010 Upgrade Script - PSExec continues to hang

#3 Post by sourbread » 07 May 2012 05:24

My logs always look like this:


===========================================================================
Install Started on %computer% %date% %time%


And that's it... no other information.. just tells me what time the install started.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Outlook 2010 Upgrade Script - PSExec continues to hang

#4 Post by foxidrive » 07 May 2012 15:25

Replace this section with the one below it, and see what is in the log after it runs.

pskill \\%computer% -accepteula msiexec
pskill \\%computer% -accepteula outlook.exe
psexec \\%computer% -accepteula c:\dload\office\setup.exe


Code: Select all

pskill \\%computer% -accepteula msiexec
echo Position A on %computer% %date% %time% >> %lnm%
pskill \\%computer% -accepteula outlook.exe
echo Position B on %computer% %date% %time% >> %lnm%
psexec \\%computer% -accepteula c:\dload\office\setup.exe
echo Position C on %computer% %date% %time% >> %lnm%

Post Reply