+ Post New Thread
Results 1 to 9 of 9
Office Software Thread, Deploy Office 2010 - Startup Script in Technical; Hi, all.. for those that are interested, here's my script to deploy office at startup Code: ' Office 2010 Deployment ...
  1. #1
    adamchapman's Avatar
    Join Date
    Aug 2007
    Location
    North Lincolnshire
    Posts
    187
    Thank Post
    29
    Thanked 14 Times in 14 Posts
    Rep Power
    17

    Deploy Office 2010 - Startup Script

    Hi, all.. for those that are interested, here's my script to deploy office at startup

    Code:
    ' Office 2010 Deployment script
    
    dim Office2010
    
    Dim WSHShell
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    
    Dim wshnetwork
    Set WshNetwork = CreateObject("WScript.Network")
    
    
    
    
    wshshell.Popup "Looking for Office 2010 on this system...",2,"ICT Support"
    on error resume next
    Office2010 = wshshell.regread("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\Office2010")
    
    
    if not Office2010 = "YES" then
    
    	wshshell.Popup "Office 2010 is not yet installed on this computer. Installation of Microsoft Office 2010 will start in a moment. This will take around 30 minutes... Grab a cuppa!",5,"ICT Support"
    	
    	WshShell.Run "\\apps\apps$\Office2010\Setup.exe /config \\apps\apps$\Office2010\ProPlus.WW\config.xml",10,True
    
    	
    	
    	'set flag so the installation doesn't start again at next reboot
    	wshshell.regwrite "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\Office2010", "YES", "REG_SZ"
    	
    	'restart the machine
    	' wait 2700 secs (45 mins) before auto OK fo message to allow ICT admins to see when a room has been completed during summer!
    	
    	wshshell.Popup "Microsoft Office 2010 Installation Complete!",2700,"ICT Support"
    	WshShell.Run "c:\windows\system32\shutdown.exe -r -t 0"
    
    else
    
    	wshshell.Popup "Good Stuff, Office is already installed on this machine.",2,"ICT Support"
    
    End If

  2. #2

    Join Date
    Jul 2011
    Posts
    11
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    I like your script but unable to get it working properly.

    Do you have a description of how it works, particularly the registry section and pc hostname section of the script.

    I can get the script to run but it does not install office from our deploy share.

  3. #3
    adamchapman's Avatar
    Join Date
    Aug 2007
    Location
    North Lincolnshire
    Posts
    187
    Thank Post
    29
    Thanked 14 Times in 14 Posts
    Rep Power
    17
    Hi,

    I've used the regisrty as a crude way of checking to see if the script has run already. If it has, the script will exit assuming that office has been installed correctly.

    the line: WshShell.Run "\\apps\apps$\Office2010\Setup.exe /config \\apps\apps$\Office2010\ProPlus.WW\config.xml",10, True

    needs setting up to reflect your share name and location to the office setup file. the scond part of the line refers to the config.xml that the office admin tool creates to customise your install to your school.

    hope that helps

  4. #4

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Quote Originally Posted by neathneathneath View Post
    I like your script but unable to get it working properly.

    Do you have a description of how it works, particularly the registry section and pc hostname section of the script.

    I can get the script to run but it does not install office from our deploy share.

    Will try to help :P (But seems I was slow )

    dim Office2010

    Dim WSHShell
    Set WSHShell = WScript.CreateObject("WScript.Shell")

    Dim wshnetwork
    Set WshNetwork = CreateObject("WScript.Network")
    1) Ignore that part just declarations.




    wshshell.Popup "Looking for Office 2010 on this system...",2,"ICT Support"
    on error resume next
    Office2010 = wshshell.regread("HKLM\SYSTEM\CurrentControlSet\Co ntrol\ComputerName\ComputerName\Office2010")
    2) Read the registry of the computer under the above string. "By default this won't exist"

    if not Office2010 = "YES" then

    wshshell.Popup "Office 2010 is not yet installed on this computer. Installation of Microsoft Office 2010 will start in a moment. This will take around 30 minutes... Grab a cuppa!",5,"ICT Support"

    WshShell.Run "\\apps\apps$\Office2010\Setup.exe /config \\apps\apps$\Office2010\ProPlus.WW\config.xml",10, True
    3) The key doesn't exist, so run the install exe.

    'set flag so the installation doesn't start again at next reboot
    wshshell.regwrite "HKLM\SYSTEM\CurrentControlSet\Control\ComputerNam e\ComputerName\Office2010", "YES", "REG_SZ"
    4) Writes "Yes" to the above key, aka so if you rerun script it won't install twice. (See #2)


    'restart the machine
    ' wait 2700 secs (45 mins) before auto OK fo message to allow ICT admins to see when a room has been completed during summer!

    wshshell.Popup "Microsoft Office 2010 Installation Complete!",2700,"ICT Support"
    WshShell.Run "c:\windows\system32\shutdown.exe -r -t 0"

    else
    wshshell.Popup "Good Stuff, Office is already installed on this machine.",2,"ICT Support"

    End If
    5) Restart computer once it's installed, or if it's already installed tell user.

    Steve

  5. Thanks to Steve21 from:

    adamchapman (28th July 2011)

  6. #5
    adamchapman's Avatar
    Join Date
    Aug 2007
    Location
    North Lincolnshire
    Posts
    187
    Thank Post
    29
    Thanked 14 Times in 14 Posts
    Rep Power
    17
    Thanks Steve!

  7. #6

    Join Date
    Jul 2011
    Posts
    11
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Thanks both for the prompt replies.

    I have amended the line that points to the deploy share - slight mistake on my part there.

    The script was stuck in a loop saying that office was installed but it wasn't.

    Deleted the registry key:
    "HKLM\SYSTEM\CurrentControlSet\Control\Compute rNam e\ComputerName\Office2010", "YES", "REG_SZ"

    and it seems to be installing OK now

    Will do some more testing and report back.

    many thanks

  8. #7

    Join Date
    Jul 2011
    Posts
    11
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Seems to be working fine on Windows XP SP3 Computers, many thanks.

    Two further queries:

    1) Have you trialled this with Windows 7 Professional?
    Seems to install but get no install popups to show progress.

    2) With regards Office 2010 Service pack 1, I've tried to slipstream the updates by folllowing various instructions and extracting the updates and copying them to the updates folder on the x86 share.
    If I run the setup.exe in the location: \\apps\Deploy\Office2010SourceFiles\x86 the updates get installed and I end up with a SP1 version of Office 2010. all scripted versions just install the vanilla version of Office 2010.
    Its probably a simple solution, any ideas please.

  9. #8
    adamchapman's Avatar
    Join Date
    Aug 2007
    Location
    North Lincolnshire
    Posts
    187
    Thank Post
    29
    Thanked 14 Times in 14 Posts
    Rep Power
    17
    Yes I have used it with Windows 7 - and yes it works, but I've got a feeling that the windows 7 startup process supresses the msgbox in someway

    no idea on the SP1 issue I'm afraid as I'm not using SCCM to deploy office now and WSUS sticks SP1 over the top

  10. #9

    Join Date
    May 2011
    Location
    Alexandria, VA
    Posts
    8
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Just FYI you can also check for the existence of HKLM:/Software/Microsoft/Windows/CurrentVersion/Uninistall/Office14.ProPlus to determine if Office 2010 is already installed. This assumes 32-bit Office and 32-bit OS or 64-bit Office and 64-bit OS.
    If 64-bit OS and 32-bit Office, the path is HKLM:/Software/Wow6432Node/Microsoft/Windows/CurrentVersion/Uninistall/Office14.ProPlus.

    You can determine OS architecture either by testing for the existence of the 'Program Files (x86)' folder or in Win 7 you can use WMI to check the OSArchitecture propery in Win32_OperatingSystem.

    The 'ProPlus' comes from the config.xml.
    Code:
    <Configuration Product="ProPlus">
    You can use this to check for installation state of other Office products as well. For example, Visio is Office14.Visio and Project Professional is Office14.PrjPro. Just check the config.xml in the product installation source and you'll find the value you need.

    I've been working on a Powershell startup script to do our migration from 2007 to 2010 on Windows 7. Will post it when I get it done.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 26th June 2010, 07:06 PM
  2. [CLOSED] Missing Content: Office forum needs new prefix [Office 2010]
    By RabbieBurns in forum EduGeek.net Site Problems
    Replies: 1
    Last Post: 14th April 2010, 01:24 PM
  3. Startup script woes
    By witch in forum Coding
    Replies: 14
    Last Post: 17th March 2010, 06:59 PM
  4. Startup Script
    By Chuckster in forum Windows
    Replies: 5
    Last Post: 26th February 2009, 12:53 PM
  5. RM CC3 Startup Script
    By randle in forum Windows
    Replies: 4
    Last Post: 30th July 2007, 02:56 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •