none
OFFICE GPO RRS feed

  • Pergunta

  • Bom,

    Criei um script para rodar via gpo de logon que roda perfeitamente no windows 8 e 8.1, porem no windows 7 ele faz a rotina instala o office mas toda a vez que reinicia a maquina ele pede pra concluir instalação e perde a ativação. Alguem sabe como resolver?

    segunda-feira, 20 de abril de 2015 12:07

Todas as Respostas

  • Ga Gilson

    bom dia

    Post o script tche para que o grupo possa analisar e lhe ajudar, e caso seja reportado algum erro post o mesmo também.

    segunda-feira, 20 de abril de 2015 13:32
  • Echo on
    setlocal
     
    REM ******************************************************************************************************************
    REM Personalização do Ambiente começa aqui. Modificar variáveis abaixo.
    REM ******************************************************************************************************************

    REM ****************************************************************************************************************** 
    REM Obter ProductName no arquivo Setup.xml na pasta do Office, e em seguida, adicione "office15." como um prefixo. 
    REM ******************************************************************************************************************
    set ProductName=Office15.PROPLUS

    REM ****************************************************************************************************************** 
    REM Definir DeployServer para um local acessível na rede que contém os arquivos de origem do Office.
    REM ******************************************************************************************************************
    set DeployServer=\\server\PacotesMsi\OFF2k13

    REM ******************************************************************************************************************
    REM Definir ConfigFile no arquivo de configuração a ser utilizada para a implantação (obrigatório)
    REM ******************************************************************************************************************
    set ConfigFile86=\\server\PacotesMsi\OFF2k13\x86\ProPlus.WW\setup86.msp
    set ConfigFile64=\\server\PacotesMsi\OFF2k13\x64\ProPlus.WW\setup64.msp

    REM ****************************************************************************************************************** 
    REM Definir LogLocation a um diretório central para coletar arquivos de log.
    REM ******************************************************************************************************************
    set LogLocation=\\server\PacotesMsi\OFF2k13\logfiles
     
    REM ******************************************************************************************************************
    REM Código de implantação começa aqui. Não modifique nada abaixo desta linha.
    REM ******************************************************************************************************************

    REM ******************************************************************************************************************
    REM Testa e desinstala versão anterior do office
    REM ******************************************************************************************************************

    :ARP1486
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\office14.proplus
    if %errorlevel%==1 (goto DeployUnOffice) else (goto ARP1464)

    :ARP1464
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\office14.proplus
    if %errorlevel%==1 (goto DeployUnOffice) else (goto PROCTEST)

    :DeployUnOffice
    call cscript %DeployServer%\Offscrub10.vbs ProPlus /bypass 1 /q /s /NoCancel
    goto PROCTEST 

    REM ******************************************************************************************************************
    REM Verifica a arquitetura do processador
    REM ******************************************************************************************************************
    :PROCTEST
    IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" (goto ARP64) else (goto ARP86) 

    REM ******************************************************************************************************************
    REM Verifica se existe uma instalação do Office 2013 (caso já exista o valor sera 0 e será redirecionado para o final)
    REM ******************************************************************************************************************
    :ARP86
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if %errorlevel%==1 (goto DeployOffice86) else (goto End)

    :ARP64
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
    if %errorlevel%==1 (goto DeployOffice64) else (goto End)

    REM ******************************************************************************************************************
    REM Se retornar 1, o produto não foi encontrado. Execute a instalação aqui.
    REM ******************************************************************************************************************
    :DeployOffice64
    start /wait %DeployServer%\x64\setup.exe /adminfile %ConfigFile64% 
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\script_log_%computername%_64.txt
    goto End

    :DeployOffice86
    start /wait %DeployServer%\x86\setup.exe /adminfile %ConfigFile86% 
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\script_log_%computername%_86.txt

    REM ****************************************************************************************************************** 
    REM Se retornar 0 ou outro, o produto foi encontrado ou ocorreu outro erro. Não fazer nada.
    REM ******************************************************************************************************************
    :End
    Endlocal
    segunda-feira, 20 de abril de 2015 14:21