Advertisement
Guest User

Untitled

a guest
Jan 28th, 2012
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. setlocal
  2.  
  3. REM *********************************************************************
  4. REM Environment customization begins here. Modify variables below.
  5. REM *********************************************************************
  6.  
  7. REM Get ProductName from the Office product's core Setup.xml file, and then add "office14." as a prefix.
  8. set ProductName=Office14.STANDARD
  9.  
  10. REM Set DeployServer to a network-accessible location containing the Office source files.
  11. set DeployServer=\\WIN2K8SERVER\MSIPrograms\office10
  12.  
  13. REM Set ConfigFile to the configuration file to be used for deployment (required)
  14. set ConfigFile=\\WIN2K8SERVER\MSIPrograms\office10\Standard.WW\config.xml
  15.  
  16. REM Set LogLocation to a central directory to collect log files.
  17. set LogLocation=\\WIN2K8SERVER\MSIPrograms\office10\office10logfiles
  18.  
  19. REM *********************************************************************
  20. REM Deployment code begins here. Do not modify anything below this line.
  21. REM *********************************************************************
  22.  
  23. IF NOT "%ProgramFiles(x86)%"=="" (goto ARP64) else (goto ARP86)
  24.  
  25. REM Operating system is X64. Check for 32 bit Office in emulated Wow6432 uninstall key
  26. :ARP64
  27. reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
  28. if NOT %errorlevel%==1 (goto End)
  29.  
  30. REM Check for 32 and 64 bit versions of Office 2010 in regular uninstall key.(Office 64bit would also appear here on a 64bit OS)
  31. :ARP86
  32. reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
  33. if %errorlevel%==1 (goto DeployOffice) else (goto End)
  34.  
  35. REM If 1 returned, the product was not found. Run setup here.
  36. :DeployOffice
  37. start /wait %DeployServer%\setup.exe /config %ConfigFile%
  38. echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
  39.  
  40. REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
  41. :End
  42.  
  43. Endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement