Jump to content

Unattended/Silent UPGRADE from 2003 to 2007


jvivace

Recommended Posts

Unattended/Silent UPGRADE from 2003 to 2007

What I have been tasked to do is to create a custom unattended/silent upgrade from 2003 to 2007.

Management is wanting to take the 2003 products installed on the machine and upgrade those without adding anything else that comes with 2007.

Example: If user has OneNote 2003 installed they want to make sure it gets upgraded to 2007 when the upgrade happens...BUT...if OneNote2003 is not installed they dont want it to get installed during the upgrade...

After all my searching and diving around, I dont think this is possible...

Anyone?

Link to comment
Share on other sites

Yeah, I don't think you'll be able to do that.

Here's the script that uninstalls Office 2003 and install Office 2007, but can't do what you mentioned in your example..



'This script will uninstall Microsoft Office 2003, wait for the uninstall to finish and then begin
'installing Microsoft Office 2007. This can be configured to be completely silent or allow prompts
'to inform its progress.



Dim install
Dim startseconds
Dim endseconds
Dim difference

startseconds = Int(Timer) 'start the initial time when script was run

'This will start the uninstall of Office 2003 based on its PID number and the /qn switch is silent
'If a confimation is desired the /qn+ switch can be used.
Set wshell = CreateObject("WScript.Shell")
wshell.run "msiexec /x {90110409-6000-11D3-8CFE-0150048383C9} /qb-" '/qn -silent /qb- no modal
Set wshell = nothing
'END code to uninstall Office 2003

install = 1
WScript.Sleep 10000 'allows the process time to start before Process Check() function runs
ProcessCheck()


'WScript.Echo "office 2003 has been uninstalled. Office 2007 will begin installation."

'starts install of Office 2007. To make this fully silent the custom-uA.xml file needs to be modified
Set wshell = CreateObject("WScript.Shell")
'this batch line must run locally where the setup.exe file is
'UNC pathing does not work with batch commands
wshell.run "setup.exe /config custom-uA.xml" 'this batch line must run locally where the setup.exe file is
Set wshell = nothing
'End code to install Office 2007

install = 2
WScript.Sleep 10000 'allows the process time to start before Process Check() function runs
ProcessCheck()

endseconds = Int(Timer)
difference = (endseconds - startseconds) / 60

'WScript.Echo "office 2007 has been installed."

WScript.Echo "Office 2003 was uninstalled and Office 2007 was installed" & vbCrLf & vbCrLf & "This took " & difference & " minutes"






'Function to check the processes
Sub ProcessCheck()
Dim computer
computer = "."
Dim process
Dim processNumber
Dim count
count = 15 'any number that grater than possible processes with the same name

If install = 1 Then
process = "msiexec.exe"
Do until count <= 1
Set service = GetObject("winmgmts:\\" & computer & "\root\cimv2")
Set results = service.ExecQuery(" Select * from Win32_Process where Name ='" & process & "'")

count = 0

for each obj in results
count= count+1
' Wscript.echo obj.Name
' Wscript.echo obj.ProcessID
Next
WScript.sleep 1000
loop
'WScript.Echo "count = " & count

Else 'office 07 setup
process = "setup.exe"
count=1
Do until count = 0
Set service = GetObject("winmgmts:\\" & computer & "\root\cimv2")
Set results = service.ExecQuery(" Select * from Win32_Process where Name ='" & process & "'")
count = 0
for each obj in results
count = 1
' Wscript.echo obj.Name
' Wscript.echo obj.ProcessID
Next
WScript.sleep 1000
loop
'WScript.Echo "count = " & count
End If

End Sub
'END the Function to check the processes

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...