Jump to content

Recommended Posts

Posted

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

 

' 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
	

  • 11 months later...
Posted

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.

Posted

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

Posted
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\Control\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\ComputerName\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

  • Thanks 1
Posted

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\ComputerNam e\ComputerName\Office2010", "YES", "REG_SZ"

 

and it seems to be installing OK now :)

 

Will do some more testing and report back.

 

many thanks

Posted

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.

Posted

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

Posted

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.

 

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...