Advertisement
Guest User

Untitled

a guest
Feb 19th, 2014
64
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.PROPLUS
  9.  
  10. REM Set DeployServer to a network-accessible location containing the Office source files.
  11. set DeployServer=\\dunsvr5\SoftwareDeployment\Office2010
  12.  
  13. REM Set ConfigFile to the configuration file to be used for deployment (required)
  14. set ConfigFile=\\dunsvr5\SoftwareDeployment\Office2010\ProPlus.WW\config.xml
  15.  
  16. REM Set LogLocation to a central directory to collect log files.
  17. set LogLocation=\\dunsvr5\SoftwareDeployment\Office2010\LogFiles
  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
  31.  
  32. 64bit OS)
  33. :ARP86
  34. reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ProductName%
  35. if %errorlevel%==1 (goto DeployOffice) else (goto End)
  36.  
  37. REM If 1 returned, the product was not found. Run setup here.
  38. :DeployOffice
  39. start /wait %DeployServer%\setup.exe /config %ConfigFile%
  40. echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt
  41.  
  42. REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
  43. :End
  44.  
  45. Endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement